diff options
author | Christian Clason <c.clason@uni-graz.at> | 2024-06-19 20:04:09 +0200 |
---|---|---|
committer | Christian Clason <c.clason@uni-graz.at> | 2024-06-19 22:50:54 +0200 |
commit | 38a1d41ac08d1fe5688cdcac1e1e181f0cd82a5f (patch) | |
tree | 500a06d36ab1c80722d8c16217e4308baf29c2d5 | |
parent | ceea6898a8bdcb6c4cfe06b8dc4739c144e6b1f8 (diff) | |
download | rneovim-38a1d41ac08d1fe5688cdcac1e1e181f0cd82a5f.tar.gz rneovim-38a1d41ac08d1fe5688cdcac1e1e181f0cd82a5f.tar.bz2 rneovim-38a1d41ac08d1fe5688cdcac1e1e181f0cd82a5f.zip |
vim-patch:aeca717: runtime(nohlsearch): simplify mapping
Use <cmd> instead of <expr> with execute(...)[-1]
closes: vim/vim#15047
https://github.com/vim/vim/commit/aeca7176f3b7bdc2d698938062f6cad802fea783
Co-authored-by: Maxim Kim <habamax@gmail.com>
-rw-r--r-- | runtime/doc/usr_05.txt | 2 | ||||
-rw-r--r-- | runtime/pack/dist/opt/nohlsearch/plugin/nohlsearch.vim | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/runtime/doc/usr_05.txt b/runtime/doc/usr_05.txt index f6324a12d5..aa7dd8d05c 100644 --- a/runtime/doc/usr_05.txt +++ b/runtime/doc/usr_05.txt @@ -244,7 +244,7 @@ Automatically execute |:nohlsearch| after 'updatetime' or getting into |Insert| Thus assuming default updatetime, hlsearch would be suspended/turned off after 4 seconds of idle time. -To disable the effect of the plugin after is has been loaded: > +To disable the effect of the plugin after it has been loaded: > au! nohlsearch < diff --git a/runtime/pack/dist/opt/nohlsearch/plugin/nohlsearch.vim b/runtime/pack/dist/opt/nohlsearch/plugin/nohlsearch.vim index 6cfe813cfa..8d9930742c 100644 --- a/runtime/pack/dist/opt/nohlsearch/plugin/nohlsearch.vim +++ b/runtime/pack/dist/opt/nohlsearch/plugin/nohlsearch.vim @@ -1,5 +1,5 @@ " nohlsearch.vim: Auto turn off hlsearch -" Last Change: 2024-06-18 +" Last Change: 2024-06-19 " Maintainer: Maxim Kim <habamax@gmail.com> " " turn off hlsearch after: @@ -8,7 +8,7 @@ augroup nohlsearch au! noremap <Plug>(nohlsearch) <cmd>nohlsearch<cr> - noremap! <expr> <Plug>(nohlsearch) execute('nohlsearch')[-1] + noremap! <Plug>(nohlsearch) <cmd>nohlsearch<cr> au CursorHold * call feedkeys("\<Plug>(nohlsearch)", 'm') au InsertEnter * call feedkeys("\<Plug>(nohlsearch)", 'm') augroup END |