diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-12-26 21:11:48 -0500 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-12-26 21:27:18 -0500 |
commit | ed0131e3d941edce315bc115b68ebf33bf6eaf31 (patch) | |
tree | 4503b6fc54ce8e9d35970398567947421a0225b9 /src | |
parent | b90ae75668cf8e8bec16755eaa7b6fa8a669a60e (diff) | |
download | rneovim-ed0131e3d941edce315bc115b68ebf33bf6eaf31.tar.gz rneovim-ed0131e3d941edce315bc115b68ebf33bf6eaf31.tar.bz2 rneovim-ed0131e3d941edce315bc115b68ebf33bf6eaf31.zip |
vim-patch:8.2.1580: wildmenu does not work properly
Problem: Wildmenu does not work properly.
Solution: Do not call may_do_incsearch_highlighting() if completion is in
progress.
https://github.com/vim/vim/commit/a60053b8f4cc7e135ba9496a8f4855d26aee09e7
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/ex_getln.c | 4 | ||||
-rw-r--r-- | src/nvim/testdir/test_cmdline.vim | 27 |
2 files changed, 30 insertions, 1 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c index 5868e3660f..0bc52f1e97 100644 --- a/src/nvim/ex_getln.c +++ b/src/nvim/ex_getln.c @@ -2255,7 +2255,9 @@ static int command_line_changed(CommandLineState *s) close_preview_windows(); update_screen(SOME_VALID); // Clear 'inccommand' preview. } else { - may_do_incsearch_highlighting(s->firstc, s->count, &s->is_state); + if (s->xpc.xp_context == EXPAND_NOTHING) { + may_do_incsearch_highlighting(s->firstc, s->count, &s->is_state); + } } if (cmdmsg_rl || (p_arshape && !p_tbidi)) { diff --git a/src/nvim/testdir/test_cmdline.vim b/src/nvim/testdir/test_cmdline.vim index e9f529d217..bb0cae4819 100644 --- a/src/nvim/testdir/test_cmdline.vim +++ b/src/nvim/testdir/test_cmdline.vim @@ -75,6 +75,33 @@ func Test_complete_wildmenu() set nowildmenu endfunc +func Test_wildmenu_screendump() + CheckScreendump + + let lines =<< trim [SCRIPT] + set wildmenu hlsearch + [SCRIPT] + call writefile(lines, 'XTest_wildmenu') + + let buf = RunVimInTerminal('-S XTest_wildmenu', {'rows': 8}) + call term_sendkeys(buf, ":vim\<Tab>") + call VerifyScreenDump(buf, 'Test_wildmenu_1', {}) + + call term_sendkeys(buf, "\<Tab>") + call VerifyScreenDump(buf, 'Test_wildmenu_2', {}) + + call term_sendkeys(buf, "\<Tab>") + call VerifyScreenDump(buf, 'Test_wildmenu_3', {}) + + call term_sendkeys(buf, "\<Tab>") + call VerifyScreenDump(buf, 'Test_wildmenu_4', {}) + call term_sendkeys(buf, "\<Esc>") + + " clean up + call StopVimInTerminal(buf) + call delete('XTest_wildmenu') +endfunc + func Test_map_completion() if !has('cmdline_compl') return |