1
0
forked from aniani/vim

patch 8.2.1998: terminal Cmd test sometimes fails to close popup

Problem:    Terminal Cmd test sometimes fails to close popup.
Solution:   Add "term_finish" option.
This commit is contained in:
Bram Moolenaar
2020-11-16 21:02:28 +01:00
parent 8adc8d9b73
commit 27f4f6baee
2 changed files with 4 additions and 3 deletions

View File

@@ -1259,15 +1259,14 @@ func Test_terminal_popup_insert_cmd()
inoremap <F3> <Cmd>call StartTermInPopup()<CR>
func StartTermInPopup()
call term_start(['/bin/sh', '-c', 'cat'], #{hidden: v:true})->popup_create(#{highlight: 'Pmenu'})
call term_start(['/bin/sh', '-c', 'cat'], #{hidden: v:true, term_finish: 'close'})->popup_create(#{highlight: 'Pmenu'})
endfunc
call feedkeys("i\<F3>")
sleep 10m
call assert_equal('n', mode())
call feedkeys("\<C-D>", 'xt')
sleep 20m
call feedkeys(":q\<CR>", 'xt')
sleep 50m
delfunc StartTermInPopup
iunmap <F3>
endfunc

View File

@@ -750,6 +750,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1998,
/**/
1997,
/**/