From 8cad930a259a05a95c7d0c527a5881d5f9a59057 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sat, 12 Aug 2017 14:32:32 +0200 Subject: patch 8.0.0912: cannot run a job in a hidden terminal Problem: Cannot run a job in a hidden terminal. Solution: Add option "hidden" and ++hidden. --- src/testdir/test_terminal.vim | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'src/testdir') diff --git a/src/testdir/test_terminal.vim b/src/testdir/test_terminal.vim index 9012bec14..97c13efbc 100644 --- a/src/testdir/test_terminal.vim +++ b/src/testdir/test_terminal.vim @@ -337,7 +337,6 @@ func Test_finish_close() endif exe 'terminal ++close ' . cmd - let buf = bufnr('') call assert_equal(2, winnr('$')) wincmd p call WaitFor("winnr('$') == 1", waittime) @@ -345,24 +344,32 @@ func Test_finish_close() call term_start(cmd, {'term_finish': 'close'}) call assert_equal(2, winnr('$')) - let buf = bufnr('') wincmd p call WaitFor("winnr('$') == 1", waittime) call assert_equal(1, winnr('$')) exe 'terminal ++open ' . cmd - let buf = bufnr('') close call WaitFor("winnr('$') == 2", waittime) call assert_equal(2, winnr('$')) bwipe call term_start(cmd, {'term_finish': 'open'}) - let buf = bufnr('') close call WaitFor("winnr('$') == 2", waittime) call assert_equal(2, winnr('$')) + bwipe + exe 'terminal ++hidden ++open ' . cmd + call assert_equal(1, winnr('$')) + call WaitFor("winnr('$') == 2", waittime) + call assert_equal(2, winnr('$')) + bwipe + + call term_start(cmd, {'term_finish': 'open', 'hidden': 1}) + call assert_equal(1, winnr('$')) + call WaitFor("winnr('$') == 2", waittime) + call assert_equal(2, winnr('$')) bwipe endfunc -- cgit v1.2.3