mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-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 vim/vim#10789)
92a1678d48
This commit is contained in:
@@ -1055,8 +1055,8 @@ void pum_show_popupmenu(vimmenu_T *menu)
|
||||
|
||||
int 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) {
|
||||
|
||||
@@ -955,6 +955,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 "\<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>
|
||||
|
||||
Reference in New Issue
Block a user