aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_getln.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-01-14 17:23:24 +0800
committerGitHub <noreply@github.com>2023-01-14 17:23:24 +0800
commit22e3b155f4b34ab54aacda6c0c96c69780e2b587 (patch)
treef512a2300f63c4043e340ab53247f15c3ef46311 /src/nvim/ex_getln.c
parente89c39d6f016a4140293755250e968e839009617 (diff)
downloadrneovim-22e3b155f4b34ab54aacda6c0c96c69780e2b587.tar.gz
rneovim-22e3b155f4b34ab54aacda6c0c96c69780e2b587.tar.bz2
rneovim-22e3b155f4b34ab54aacda6c0c96c69780e2b587.zip
vim-patch:partial:8.2.4339: CTRL-A does not work properly with the cmdline popup menu (#21791)
Problem: CTRL-A does not work properly with the cmdline popup menu. Solution: Fix issues with CTRL-A. Add more tests for the cmdline popup menu. Remove TermWait() before VeriryScreenDump(). Refactor the cmdline popup code. (Yegappan Lakshmanan, closes vim/vim#9735) https://github.com/vim/vim/commit/560dff49c0095111fc96b4b8dd7f4d269aba9473 Only port cmdexpand.c and test_cmdline.vim changes. Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Diffstat (limited to 'src/nvim/ex_getln.c')
-rw-r--r--src/nvim/ex_getln.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c
index b73ed98443..72208c976f 100644
--- a/src/nvim/ex_getln.c
+++ b/src/nvim/ex_getln.c
@@ -1225,6 +1225,8 @@ static int command_line_execute(VimState *state, int key)
}
if (cmdline_pum_active() || s->did_wild_list) {
+ // Ctrl-Y: Accept the current selection and close the popup menu.
+ // Ctrl-E: cancel the cmdline popup menu and return the original text.
if (s->c == Ctrl_E || s->c == Ctrl_Y) {
const int wild_type = (s->c == Ctrl_E) ? WILD_CANCEL : WILD_APPLY;
(void)nextwild(&s->xpc, wild_type, WILD_NO_BEEP, s->firstc != '@');