vim-patch:8.0.1588: popup menu hangs after typing CTRL-C

Problem:    Popup menu hangs after typing CTRL-C.
Solution:   Make CTRL-C exit the loop. (Ozaki Kiichi, closes vim/vim#2697)
52f18a112a
This commit is contained in:
zeertzjq 2022-06-30 16:00:56 +08:00
parent e4c2ff2da4
commit 5551a29d06

View File

@ -1036,7 +1036,7 @@ void pum_show_popupmenu(vimmenu_T *menu)
ui_flush(); ui_flush();
int c = vgetc(); int c = vgetc();
if (c == ESC) { if (c == ESC || c == Ctrl_C) {
break; break;
} else if (c == CAR || c == NL) { } else if (c == CAR || c == NL) {
// enter: select current item, if any, and close // enter: select current item, if any, and close