diff src/testdir/test_terminal2.vim @ 22097:f369bbd71a53 v8.2.1598

patch 8.2.1598: starting a hidden terminal resizes the current window Commit: https://github.com/vim/vim/commit/2ce14589f210dcb3d17d1d80285256f8ac10abab Author: Bram Moolenaar <Bram@vim.org> Date: Sat Sep 5 16:08:49 2020 +0200 patch 8.2.1598: starting a hidden terminal resizes the current window Problem: Starting a hidden terminal resizes the current window. Solution: Do not resize the current window for a hidden terminal. (closes #6872)
author Bram Moolenaar <Bram@vim.org>
date Sat, 05 Sep 2020 16:15:03 +0200
parents ff21e2962490
children 4373f3569140
line wrap: on
line diff
--- a/src/testdir/test_terminal2.vim
+++ b/src/testdir/test_terminal2.vim
@@ -130,6 +130,16 @@ func Test_terminal_termwinsize_overruled
   set termwinsize=
 endfunc
 
+" hidden terminal must not change current window size
+func Test_terminal_hidden_winsize()
+  let cmd = GetDummyCmd()
+  let rows = winheight(0)
+  let buf = term_start(cmd, #{hidden: 1, term_rows: 10})
+  call assert_equal(rows, winheight(0))
+  call assert_equal([10, &columns], term_getsize(buf))
+  exe "bwipe! " .. buf
+endfunc
+
 func Test_terminal_termwinkey()
   " make three tabpages, terminal in the middle
   0tabnew