patch 9.1.1604: completion: incsearch highlight might be lost
Commit:
https://github.com/vim/vim/commit/04c9e78cd33216dfd2cc59b748d1e267d6920c9a
Author: Girish Palya <[email protected]>
Date: Fri Aug 8 12:42:10 2025 +0200
patch 9.1.1604: completion: incsearch highlight might be lost
Problem: completion: incsearch highlight might be lost after search
completion (Hirohito Higashi)
Solution: Restore incsearch highlight after dismissing pum with Ctrl-E
(Girish Palya)
related: #17870
closes: #17891
Signed-off-by: Christian Brabandt <[email protected]>
diff --git a/src/ex_getln.c b/src/ex_getln.c
index 560324c6e..0febe432b 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -2113,13 +2113,10 @@ getcmdline_int(
{
#ifdef FEAT_SEARCH_EXTRA
// Apply search highlighting
- if (wild_type == WILD_APPLY)
- {
- if (is_state.winid != curwin->w_id)
- init_incsearch_state(&is_state);
- if (KeyTyped || vpeekc() == NUL)
- may_do_incsearch_highlighting(firstc, count, &is_state);
- }
+ if (is_state.winid != curwin->w_id)
+ init_incsearch_state(&is_state);
+ if (KeyTyped || vpeekc() == NUL)
+ may_do_incsearch_highlighting(firstc, count, &is_state);
#endif
wild_type = 0;
goto cmdline_not_changed;
diff --git a/src/testdir/dumps/Test_search_wildmenu_9.dump
b/src/testdir/dumps/Test_search_wildmenu_9.dump
new file mode 100644
index 000000000..54ca2839b
--- /dev/null
+++ b/src/testdir/dumps/Test_search_wildmenu_9.dump
@@ -0,0 +1,10 @@
+|t+0&#ffffff0|h|e| @71
+|t+1&&|h|e+0&&|s|e| @69
+|t|h|e| @71
+|f|o@1|b|a|r| @68
+|t|h|e|t|h|e| @68
+|t|h|e|t|h|e|r|e| @66
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|/+0#0000000&|t|h> @71
diff --git a/src/testdir/test_cmdline.vim b/src/testdir/test_cmdline.vim
index 95940d57b..5bc698106 100644
--- a/src/testdir/test_cmdline.vim
+++ b/src/testdir/test_cmdline.vim
@@ -4631,6 +4631,12 @@ func Test_search_wildmenu_screendump()
call term_sendkeys(buf, "\<c-n>\<c-y>")
call VerifyScreenDump(buf, 'Test_search_wildmenu_8', {})
+ " 'incsearch' highlight is restored after dismissing popup (Ctrl_E)
+ call term_sendkeys(buf, "\<esc>:set wop=pum is hls&\<cr>")
+ call term_sendkeys(buf, "gg/th\<tab>\<c-e>")
+ call TermWait(buf, 50)
+ call VerifyScreenDump(buf, 'Test_search_wildmenu_9', {})
+
call term_sendkeys(buf, "\<esc>")
call StopVimInTerminal(buf)
endfunc
diff --git a/src/version.c b/src/version.c
index deb219172..2cd99fc78 100644
--- a/src/version.c
+++ b/src/version.c
@@ -719,6 +719,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1604,
/**/
1603,
/**/
--
--
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 [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/vim_dev/E1ukKpV-002IFa-Pr%40256bit.org.