0
0
mirror of https://github.com/vim/vim.git synced 2025-10-04 05:25:06 -04:00

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.
This commit is contained in:
Bram Moolenaar
2019-05-30 15:53:29 +02:00
parent cacc6a5c98
commit 5c3fb04623
2 changed files with 6 additions and 1 deletions

View File

@@ -1302,7 +1302,10 @@ pum_show_popupmenu(vimmenu_T *menu)
out_flush();
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)
{

View File

@@ -767,6 +767,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1424,
/**/
1423,
/**/