Patch 9.0.0076

2 views
Skip to first unread message

Bram Moolenaar

unread,
Jul 26, 2022, 7:25:25 AM7/26/22
to vim...@googlegroups.com

Patch 9.0.0076
Problem: No test for what patch 8.1.1424 fixes.
Solution: Add a test. (closes #10789)
Files: src/popupmenu.c, src/testdir/test_popup.vim


*** ../vim-9.0.0075/src/popupmenu.c 2022-05-07 18:10:54.000000000 +0100
--- src/popupmenu.c 2022-07-26 12:22:57.150995547 +0100
***************
*** 1549,1556 ****

c = vgetc();

! // Bail out when typing Esc, CTRL-C or some callback closed the popup
! // menu.
if (c == ESC || c == Ctrl_C || pum_array == NULL)
break;
else if (c == CAR || c == NL)
--- 1549,1556 ----

c = vgetc();

! // 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)
*** ../vim-9.0.0075/src/testdir/test_popup.vim 2022-06-21 16:41:32.000000000 +0100
--- src/testdir/test_popup.vim 2022-07-26 12:22:57.150995547 +0100
***************
*** 984,989 ****
--- 984,1008 ----
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>
*** ../vim-9.0.0075/src/version.c 2022-07-26 11:42:31.487977143 +0100
--- src/version.c 2022-07-26 12:23:47.270901077 +0100
***************
*** 737,738 ****
--- 737,740 ----
{ /* Add new patch number below this line */
+ /**/
+ 76,
/**/

--
Why is it called "Windows"? "Gates" would be more appropriate...

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages