changeset 35862:56ca5831602c

runtime(nohlsearch): add missing loaded_hlsearch guard Commit: https://github.com/vim/vim/commit/5753d99ff667d0feeff6b582bb7df9aaedd9a2cb Author: Maxim Kim <habamax@gmail.com> Date: Wed Jul 31 22:07:43 2024 +0200 runtime(nohlsearch): add missing loaded_hlsearch guard related: https://github.com/vim/vim/issues/15039 closes: https://github.com/vim/vim/issues/15402 Signed-off-by: Maxim Kim <habamax@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Wed, 31 Jul 2024 22:15:02 +0200
parents 1fdd84486f70
children ae9817df17d0
files runtime/pack/dist/opt/nohlsearch/plugin/nohlsearch.vim
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/runtime/pack/dist/opt/nohlsearch/plugin/nohlsearch.vim
+++ b/runtime/pack/dist/opt/nohlsearch/plugin/nohlsearch.vim
@@ -1,10 +1,16 @@
 " nohlsearch.vim: Auto turn off hlsearch
-" Last Change: 2024-06-19
+" Last Change: 2024-07-31
 " Maintainer: Maxim Kim <habamax@gmail.com>
 "
 " turn off hlsearch after:
 " - doing nothing for 'updatetime'
 " - getting into insert mode
+
+if exists('g:loaded_nohlsearch')
+    finish
+endif
+let g:loaded_nohlsearch = 1
+
 augroup nohlsearch
     au!
     noremap <Plug>(nohlsearch) <cmd>nohlsearch<cr>