mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
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 <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
3be4ad76df
commit
04c9e78cd3
@@ -2113,13 +2113,10 @@ getcmdline_int(
|
|||||||
{
|
{
|
||||||
#ifdef FEAT_SEARCH_EXTRA
|
#ifdef FEAT_SEARCH_EXTRA
|
||||||
// Apply search highlighting
|
// Apply search highlighting
|
||||||
if (wild_type == WILD_APPLY)
|
|
||||||
{
|
|
||||||
if (is_state.winid != curwin->w_id)
|
if (is_state.winid != curwin->w_id)
|
||||||
init_incsearch_state(&is_state);
|
init_incsearch_state(&is_state);
|
||||||
if (KeyTyped || vpeekc() == NUL)
|
if (KeyTyped || vpeekc() == NUL)
|
||||||
may_do_incsearch_highlighting(firstc, count, &is_state);
|
may_do_incsearch_highlighting(firstc, count, &is_state);
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
wild_type = 0;
|
wild_type = 0;
|
||||||
goto cmdline_not_changed;
|
goto cmdline_not_changed;
|
||||||
|
10
src/testdir/dumps/Test_search_wildmenu_9.dump
Normal file
10
src/testdir/dumps/Test_search_wildmenu_9.dump
Normal file
@@ -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
|
@@ -4631,6 +4631,12 @@ func Test_search_wildmenu_screendump()
|
|||||||
call term_sendkeys(buf, "\<c-n>\<c-y>")
|
call term_sendkeys(buf, "\<c-n>\<c-y>")
|
||||||
call VerifyScreenDump(buf, 'Test_search_wildmenu_8', {})
|
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 term_sendkeys(buf, "\<esc>")
|
||||||
call StopVimInTerminal(buf)
|
call StopVimInTerminal(buf)
|
||||||
endfunc
|
endfunc
|
||||||
|
@@ -719,6 +719,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1604,
|
||||||
/**/
|
/**/
|
||||||
1603,
|
1603,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user