1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 22:30:04 +08:00

Fix n/N do not change hl state

close #710
This commit is contained in:
wsdjeg 2017-07-11 05:56:14 +08:00
parent abf0581a66
commit 8144d4d838

View File

@ -67,10 +67,18 @@ endfunction
let s:si_flag = 0
function! s:update_search_index(key) abort
if a:key == 'n'
normal! n
if mapcheck("<Plug>(incsearch-nohl-n)") !=# ''
call feedkeys("\<Plug>(incsearch-nohl-n)")
else
normal! n
endif
normal! ml
elseif a:key == 'N'
normal! N
if mapcheck("<Plug>(incsearch-nohl-n)") !=# ''
call feedkeys("\<Plug>(incsearch-nohl-N)")
else
normal! N
endif
normal! ml
endif
if s:si_flag == 0