vim-patch:5753d99: runtime(nohlsearch): add missing loaded_hlsearch guard

related: vim/vim#15039
closes: vim/vim#15402

5753d99ff6

Co-authored-by: Maxim Kim <habamax@gmail.com>
This commit is contained in:
Christian Clason 2024-07-31 22:45:00 +02:00
parent 479af3b006
commit e1d48d5cf2

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>