Mercurial > vim
diff src/testdir/test_terminal.vim @ 12479:65c7769ef6d1 v8.0.1119
patch 8.0.1119: quitting a split terminal window kills the job
commit https://github.com/vim/vim/commit/8adb0d03ca2694922da915356d7ede05e31c5a5c
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Sep 17 19:08:02 2017 +0200
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.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 17 Sep 2017 19:15:05 +0200 |
parents | 827ad6758d33 |
children | 5cf248ecb6e3 |
line wrap: on
line diff
--- a/src/testdir/test_terminal.vim +++ b/src/testdir/test_terminal.vim @@ -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