From: zeertzjq Date: Tue, 26 Jul 2022 11:24:41 +0000 (+0100) Subject: patch 9.0.0076: no test for what patch 8.1.1424 fixes X-Git-Tag: v9.0.0076 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=92a1678d488b7d023ddf2cd493a6ee0d7fcf1928;p=thirdparty%2Fvim.git 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 c030cc9e8d..37c4a6d255 100644 --- a/src/popupmenu.c +++ b/src/popupmenu.c @@ -1549,8 +1549,8 @@ pum_show_popupmenu(vimmenu_T *menu) 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 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 5fb7e82229..af14167d57 100644 --- a/src/testdir/test_popup.vim +++ b/src/testdir/test_popup.vim @@ -984,6 +984,25 @@ func Test_menu_only_exists_in_terminal() 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 "\" + endfunc + + nmenu Foo.Bar : + nnoremap Func() + call feedkeys("\\\", 'xt') + + delfunc Func + nunmenu Foo.Bar + nunmap +endfunc + func Test_popup_complete_info_01() new inoremap =complete_info().mode diff --git a/src/version.c b/src/version.c index 1909fd4b42..9081fecd11 100644 --- a/src/version.c +++ b/src/version.c @@ -735,6 +735,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 76, /**/ 75, /**/