runtime(nohlsearch): simplify mapping

Commit: 
https://github.com/vim/vim/commit/aeca7176f3b7bdc2d698938062f6cad802fea783
Author: Maxim Kim <haba...@gmail.com>
Date:   Wed Jun 19 19:42:47 2024 +0200

    runtime(nohlsearch): simplify mapping
    
    Use <cmd> instead of <expr> with execute(...)[-1]
    
    closes: #15047
    
    Signed-off-by: Maxim Kim <haba...@gmail.com>
    Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/runtime/doc/usr_05.txt b/runtime/doc/usr_05.txt
index 5065e4583..d9222594c 100644
--- a/runtime/doc/usr_05.txt
+++ b/runtime/doc/usr_05.txt
@@ -1,4 +1,4 @@
-*usr_05.txt*   For Vim version 9.1.  Last change: 2024 Jun 18
+*usr_05.txt*   For Vim version 9.1.  Last change: 2024 Jun 19
 
                     VIM USER MANUAL - by Bram Moolenaar
 
@@ -459,7 +459,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 6cfe813cf..8d9930742 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 <haba...@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

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/E1sJzbL-005FYz-Lh%40256bit.org.

Raspunde prin e-mail lui