changeset 18239:9e696b8fee7d v8.1.2114

patch 8.1.2114: when a popup is closed with CTRL-C the callback aborts Commit: https://github.com/vim/vim/commit/fd00c042afc40539447e798aadbd0a2219fdbdc1 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Oct 5 11:56:54 2019 +0200 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 https://github.com/vim/vim/issues/5008)
author Bram Moolenaar <Bram@vim.org>
date Sat, 05 Oct 2019 12:00:04 +0200
parents 545afb8a9207
children 7aed836f50f7
files src/popupwin.c src/version.c
diffstat 2 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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;
     }
 
--- 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,