mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-09 16:40:05 +08:00
Merge pull request #765 from mdavezac/ignoreCase
Fix issue with n vs N when ignorecase is set
This commit is contained in:
commit
19adf66cd7
@ -38,8 +38,8 @@ function! SpaceVim#layers#incsearch#config() abort
|
|||||||
map g/ <Plug>(incsearch-stay)
|
map g/ <Plug>(incsearch-stay)
|
||||||
set hlsearch
|
set hlsearch
|
||||||
let g:incsearch#auto_nohlsearch = get(g:, 'incsearch#auto_nohlsearch', 1)
|
let g:incsearch#auto_nohlsearch = get(g:, 'incsearch#auto_nohlsearch', 1)
|
||||||
noremap <silent> n :call <SID>update_search_index('n')<cr>
|
noremap <silent> n :call <SID>update_search_index('d')<cr>
|
||||||
noremap <silent> N :call <SID>update_search_index('N')<cr>
|
noremap <silent> N :call <SID>update_search_index('r')<cr>
|
||||||
map * <Plug>(incsearch-nohl-*)
|
map * <Plug>(incsearch-nohl-*)
|
||||||
map # <Plug>(incsearch-nohl-#)
|
map # <Plug>(incsearch-nohl-#)
|
||||||
map g* <Plug>(incsearch-nohl-g*)
|
map g* <Plug>(incsearch-nohl-g*)
|
||||||
@ -66,15 +66,15 @@ endfunction
|
|||||||
|
|
||||||
let s:si_flag = 0
|
let s:si_flag = 0
|
||||||
function! s:update_search_index(key) abort
|
function! s:update_search_index(key) abort
|
||||||
if a:key == 'n'
|
if a:key == 'd'
|
||||||
if mapcheck("<Plug>(incsearch-nohl-n)") !=# ''
|
if mapcheck("<Plug>(incsearch-nohl-n)") !=# ''
|
||||||
call feedkeys("\<Plug>(incsearch-nohl-n)")
|
call feedkeys("\<Plug>(incsearch-nohl-n)")
|
||||||
else
|
else
|
||||||
normal! n
|
normal! n
|
||||||
endif
|
endif
|
||||||
normal! ml
|
normal! ml
|
||||||
elseif a:key == 'N'
|
elseif a:key == 'r'
|
||||||
if mapcheck("<Plug>(incsearch-nohl-n)") !=# ''
|
if mapcheck("<Plug>(incsearch-nohl-N)") !=# ''
|
||||||
call feedkeys("\<Plug>(incsearch-nohl-N)")
|
call feedkeys("\<Plug>(incsearch-nohl-N)")
|
||||||
else
|
else
|
||||||
normal! N
|
normal! N
|
||||||
|
Loading…
Reference in New Issue
Block a user