mirror of
https://github.com/vim/vim.git
synced 2025-11-13 22:54:27 -05:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user