Skip to content

Commit

Permalink
fix: also disable related mapping when autonohl is off
Browse files Browse the repository at this point in the history
  • Loading branch information
bennyyip committed Jul 30, 2019
1 parent 9a5ab85 commit 0ec1bbb
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions plugin/is.vim
Expand Up @@ -56,12 +56,14 @@ if get(g:, 'is#do_default_mappings', 1)
if mapcheck("\<C-k>", 'c') ==# ''
cmap <C-k> <Plug>(is-scroll-b)
endif
for s:map in ['n', 'N', '*', '#', 'g*', 'g#']
if mapcheck(s:map, '') ==# ''
execute printf(':map %s <Plug>(is-%s)', s:map, s:map)
endif
endfor
unlet s:map
if get(g:, 'is#auto_nohlsearch', 1)
for s:map in ['n', 'N', '*', '#', 'g*', 'g#']
if mapcheck(s:map, '') ==# ''
execute printf(':map %s <Plug>(is-%s)', s:map, s:map)
endif
unlet s:map
endfor
endif
endif

" __END__
Expand Down

0 comments on commit 0ec1bbb

Please sign in to comment.