1
0
forked from aniani/vim

runtime(nohlsearch): add missing loaded_hlsearch guard

related: #15039
closes: #15402

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Maxim Kim 2024-07-31 22:07:43 +02:00 committed by Christian Brabandt
parent 56e8ed6162
commit 5753d99ff6
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09

View File

@ -1,10 +1,16 @@
" nohlsearch.vim: Auto turn off hlsearch " nohlsearch.vim: Auto turn off hlsearch
" Last Change: 2024-06-19 " Last Change: 2024-07-31
" Maintainer: Maxim Kim <habamax@gmail.com> " Maintainer: Maxim Kim <habamax@gmail.com>
" "
" turn off hlsearch after: " turn off hlsearch after:
" - doing nothing for 'updatetime' " - doing nothing for 'updatetime'
" - getting into insert mode " - getting into insert mode
if exists('g:loaded_nohlsearch')
finish
endif
let g:loaded_nohlsearch = 1
augroup nohlsearch augroup nohlsearch
au! au!
noremap <Plug>(nohlsearch) <cmd>nohlsearch<cr> noremap <Plug>(nohlsearch) <cmd>nohlsearch<cr>