diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-10-05 11:56:54 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-10-05 11:56:54 +0200 |
commit | fd00c042afc40539447e798aadbd0a2219fdbdc1 (patch) | |
tree | d6b922e83c04746ca55419c57da357d88e95080b /src | |
parent | 9ca250855b55f4d3292b010525c827dc6992cb61 (diff) | |
download | vim-git-fd00c042afc40539447e798aadbd0a2219fdbdc1.tar.gz |
patch 8.1.2114: when a popup is closed with CTRL-C the callback abortsv8.1.2114
Problem: When a popup is closed with CTRL-C the callback aborts.
Solution: Reset got_int when invoking the callback. (closes #5008)
Diffstat (limited to 'src')
-rw-r--r-- | src/popupwin.c | 5 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/popupwin.c b/src/popupwin.c index 06812073e..6b0b383b0 100644 --- a/src/popupwin.c +++ b/src/popupwin.c @@ -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; } diff --git a/src/version.c b/src/version.c index d37ee657d..0673d7e78 100644 --- a/src/version.c +++ b/src/version.c @@ -754,6 +754,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 2114, +/**/ 2113, /**/ 2112, |