patch 9.0.0076: no test for what patch 8.1.1424 fixes
Problem: No test for what patch 8.1.1424 fixes.
Solution: Add a test. (closes #10789)
diff --git a/src/popupmenu.c b/src/popupmenu.c
index c030cc9..37c4a6d 100644
--- a/src/popupmenu.c
+++ b/src/popupmenu.c
@@ -1549,8 +1549,8 @@
c = vgetc();
- // Bail out when typing Esc, CTRL-C or some callback closed the popup
- // menu.
+ // Bail out when typing Esc, CTRL-C or some callback or <expr> mapping
+ // closed the popup menu.
if (c == ESC || c == Ctrl_C || pum_array == NULL)
break;
else if (c == CAR || c == NL)
diff --git a/src/testdir/test_popup.vim b/src/testdir/test_popup.vim
index 5fb7e82..af14167 100644
--- a/src/testdir/test_popup.vim
+++ b/src/testdir/test_popup.vim
@@ -984,6 +984,25 @@
endtry
endfunc
+" This used to crash before patch 8.1.1424
+func Test_popup_delete_when_shown()
+ CheckFeature menu
+ CheckNotGui
+
+ func Func()
+ popup Foo
+ return "\<Ignore>"
+ endfunc
+
+ nmenu Foo.Bar :
+ nnoremap <expr> <F2> Func()
+ call feedkeys("\<F2>\<F2>\<Esc>", 'xt')
+
+ delfunc Func
+ nunmenu Foo.Bar
+ nunmap <F2>
+endfunc
+
func Test_popup_complete_info_01()
new
inoremap <buffer><F5> <C-R>=complete_info().mode<CR>
diff --git a/src/version.c b/src/version.c
index 1909fd4..9081fec 100644
--- a/src/version.c
+++ b/src/version.c
@@ -736,6 +736,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 76,
+/**/
75,
/**/
74,