mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:8.1.1424: crash when popup menu is deleted while waiting for char
Problem: Crash when popup menu is deleted while waiting for char.
Solution: Bail out when pum_array was cleared.
5c3fb04623
This commit is contained in:
parent
cbfae548e8
commit
ee8606d31f
@ -1054,7 +1054,10 @@ void pum_show_popupmenu(vimmenu_T *menu)
|
||||
ui_flush();
|
||||
|
||||
int c = vgetc();
|
||||
if (c == ESC || c == Ctrl_C) {
|
||||
|
||||
// Bail out when typing Esc, CTRL-C or some callback closed the popup
|
||||
// menu.
|
||||
if (c == ESC || c == Ctrl_C || pum_array == NULL) {
|
||||
break;
|
||||
} else if (c == CAR || c == NL) {
|
||||
// enter: select current item, if any, and close
|
||||
|
Loading…
Reference in New Issue
Block a user