1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-24 05:30:07 +08:00

Merge pull request #720 from SpaceVim/incsearch

Fix n/N do not change hl state
This commit is contained in:
Wang Shidong 2017-07-10 23:44:21 +08:00 committed by GitHub
commit ca77d89d74

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