1
0
forked from aniani/vim

patch 8.0.1119: quitting a split terminal window kills the job

Problem:    Quitting a split terminal window kills the job. (Yasuhiro
            Matsumoto)
Solution:   Only stop terminal job if it is the last window.
This commit is contained in:
Bram Moolenaar
2017-09-17 19:08:02 +02:00
parent 4033c55eca
commit 8adb0d03ca
3 changed files with 39 additions and 20 deletions

View File

@@ -82,6 +82,23 @@ func Test_terminal_wipe_buffer()
unlet g:job
endfunc
func Test_terminal_split_quit()
let buf = Run_shell_in_terminal({})
call term_wait(buf)
split
quit!
call term_wait(buf)
sleep 50m
call assert_equal('run', job_status(g:job))
quit!
call WaitFor('job_status(g:job) == "dead"')
call assert_equal('dead', job_status(g:job))
exe buf . 'bwipe'
unlet g:job
endfunc
func Test_terminal_hide_buffer()
let buf = Run_shell_in_terminal({})
setlocal bufhidden=hide