1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-04-13 14:49:11 +08:00

Fix uniquify lines in normal mode when ignorecase. (#4189)

Co-authored-by: Kun Lin <ssfjhh@gmail.com>
This commit is contained in:
Kun Lin 2021-04-11 12:23:47 +08:00 committed by GitHub
parent 2335944a18
commit 4963cd66ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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