1
0
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:
Bram Moolenaar
2020-11-01 20:58:26 +01:00
parent 645cd3eb1f
commit a46765a797
4 changed files with 5 additions and 4 deletions

View File

@@ -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