forked from aniani/vim
patch 8.2.1938: wiping out a terminal buffer makes some tests fail
Problem: Wiping out a terminal buffer makes some tests fail. Solution: Do not wipe out the terminal buffer unless wanted.
This commit is contained in:
@@ -134,7 +134,7 @@ func RunVimInTerminal(arguments, options)
|
||||
endfunc
|
||||
|
||||
" Stop a Vim running in terminal buffer "buf".
|
||||
func StopVimInTerminal(buf)
|
||||
func StopVimInTerminal(buf, kill = 1)
|
||||
" Using a terminal to run Vim is always considered flaky.
|
||||
let g:test_is_flaky = 1
|
||||
|
||||
@@ -151,7 +151,7 @@ func StopVimInTerminal(buf)
|
||||
call WaitForAssert({-> assert_equal("finished", term_getstatus(a:buf))})
|
||||
|
||||
" If the buffer still exists forcefully wipe it.
|
||||
if bufexists(a:buf)
|
||||
if a:kill && bufexists(a:buf)
|
||||
exe a:buf .. 'bwipe!'
|
||||
endif
|
||||
endfunc
|
||||
|
||||
Reference in New Issue
Block a user