summaryrefslogtreecommitdiff
path: root/src/testdir/test_terminal.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-05-18 19:46:48 +0200
committerBram Moolenaar <Bram@vim.org>2020-05-18 19:46:48 +0200
commitb5383b174b2436b556f76f14badb1c1f55d6d8f6 (patch)
tree9ac5d993e3a2febe97c8c77e19e1928a47bcf739 /src/testdir/test_terminal.vim
parent843700875e50c03c94245bef1b2de147b9b3b585 (diff)
downloadvim-git-b5383b174b2436b556f76f14badb1c1f55d6d8f6.tar.gz
patch 8.2.0791: a second popup window with terminal causes troublev8.2.0791
Problem: A second popup window with terminal causes trouble. Solution: Disallow opening a second terminal-popup window. (closes #6101, closes #6103) Avoid defaulting to an invalid line number.
Diffstat (limited to 'src/testdir/test_terminal.vim')
-rw-r--r--src/testdir/test_terminal.vim7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/testdir/test_terminal.vim b/src/testdir/test_terminal.vim
index ab1961aa3..7f85f6cf1 100644
--- a/src/testdir/test_terminal.vim
+++ b/src/testdir/test_terminal.vim
@@ -2587,9 +2587,8 @@ func Test_double_popup_terminal()
let buf1 = term_start(&shell, #{hidden: 1})
let win1 = popup_create(buf1, {})
let buf2 = term_start(&shell, #{hidden: 1})
- let win2 = popup_create(buf2, {})
+ call assert_fails('call popup_create(buf2, {})', 'E861:')
call popup_close(win1)
- call popup_close(win2)
exe buf1 .. 'bwipe!'
exe buf2 .. 'bwipe!'
endfunc
@@ -2619,10 +2618,8 @@ func Test_term_nasty_callback()
CheckExecutable sh
set hidden
- let g:buf0 = term_start('sh', #{hidden: 1})
+ let g:buf0 = term_start('sh', #{hidden: 1, term_finish: 'close'})
call popup_create(g:buf0, {})
- let g:buf1 = term_start('sh', #{hidden: 1, term_finish: 'close'})
- call popup_create(g:buf1, {})
call assert_fails("call term_start(['sh', '-c'], #{curwin: 1})", 'E863:')
call popup_clear(1)