forked from aniani/vim
patch 8.2.1937: Vim9: test for confirm modifier fails in some situations
Problem: Vim9: test for confirm modifier fails in some situations. Solution: Add a short wait. Handle failure better.
This commit is contained in:
@@ -147,8 +147,13 @@ func StopVimInTerminal(buf)
|
||||
" Wait for all the pending updates to terminal to complete
|
||||
call TermWait(a:buf)
|
||||
|
||||
" Wait for the terminal to end.
|
||||
call WaitForAssert({-> assert_equal("finished", term_getstatus(a:buf))})
|
||||
only!
|
||||
|
||||
" If the buffer still exists forcefully wipe it.
|
||||
if bufexists(a:buf)
|
||||
exe a:buf .. 'bwipe!'
|
||||
endif
|
||||
endfunc
|
||||
|
||||
" Open a terminal with a shell, assign the job to g:job and return the buffer
|
||||
|
||||
Reference in New Issue
Block a user