0
0
mirror of https://github.com/vim/vim.git synced 2025-10-13 06:54:15 -04:00

patch 8.1.2114: when a popup is closed with CTRL-C the callback aborts

Problem:    When a popup is closed with CTRL-C the callback aborts.
Solution:   Reset got_int when invoking the callback. (closes #5008)
This commit is contained in:
Bram Moolenaar
2019-10-05 11:56:54 +02:00
parent 9ca250855b
commit fd00c042af
2 changed files with 7 additions and 0 deletions

View File

@@ -2763,7 +2763,12 @@ invoke_popup_filter(win_T *wp, int c)
// Emergency exit: CTRL-C closes the popup.
if (c == Ctrl_C)
{
int save_got_int = got_int;
// Reset got_int to avoid the callback isn't called.
got_int = FALSE;
popup_close_with_retval(wp, -1);
got_int |= save_got_int;
return 1;
}

View File

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