From 4963cd66efabc3df50465e94e800bf3173f41854 Mon Sep 17 00:00:00 2001 From: Kun Lin <5350867+ssfjhh@users.noreply.github.com> Date: Sun, 11 Apr 2021 12:23:47 +0800 Subject: [PATCH] Fix uniquify lines in normal mode when ignorecase. (#4189) Co-authored-by: Kun Lin --- autoload/SpaceVim/layers/edit.vim | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/autoload/SpaceVim/layers/edit.vim b/autoload/SpaceVim/layers/edit.vim index bd701e140..838e99c58 100644 --- a/autoload/SpaceVim/layers/edit.vim +++ b/autoload/SpaceVim/layers/edit.vim @@ -625,8 +625,16 @@ function! s:uniquify_lines(visual, ignorecase) abort endfor call s:BUFFER.buf_set_lines(bufnr('.'), start_line-1 , end_line, 0, rst) else - if line('.') > 1 && getline('.') ==# getline(line('.') - 1) - normal! dd + if line('.') > 1 + if a:ignorecase + if getline('.') ==? getline(line('.') - 1) + normal! dd + endif + else + if getline('.') ==# getline(line('.') - 1) + normal! dd + endif + endif endif endif endfunction