summaryrefslogtreecommitdiffstats
path: root/src/testdir/screendump.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-03-25 18:56:25 +0200
committerBram Moolenaar <Bram@vim.org>2018-03-25 18:56:25 +0200
commit15a1c3fdc19499c267e4dc664aa0de9d65a08cad (patch)
tree2f254bb85d7844b5ecc08344751fc5649e2e8943 /src/testdir/screendump.vim
parent8fbaeb195d9298c3a2a80300b5f96f1adddd2f59 (diff)
patch 8.0.1642: running Vim in terminal fails with two windowsv8.0.1642
Problem: Running Vim in terminal fails with two windows. Solution: Pass the number of rows to RunVimInTerminal().
Diffstat (limited to 'src/testdir/screendump.vim')
-rw-r--r--src/testdir/screendump.vim10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/testdir/screendump.vim b/src/testdir/screendump.vim
index 093b483f10..60c0ccb012 100644
--- a/src/testdir/screendump.vim
+++ b/src/testdir/screendump.vim
@@ -47,11 +47,17 @@ func RunVimInTerminal(arguments, options)
set t_Co=256 background=light
hi Normal ctermfg=NONE ctermbg=NONE
+ " Make the window 20 lines high, unless told otherwise.
+ let rows = 20
+ if has_key(a:options, 'rows')
+ let rows = a:options['rows']
+ endif
+
let cmd = GetVimCommandClean()
" Add -v to have gvim run in the terminal (if possible)
let cmd .= ' -v ' . a:arguments
- let buf = term_start(cmd, {'curwin': 1, 'term_rows': 20, 'term_cols': 75})
- call assert_equal([20, 75], term_getsize(buf))
+ let buf = term_start(cmd, {'curwin': 1, 'term_rows': rows, 'term_cols': 75})
+ call assert_equal([rows, 75], term_getsize(buf))
return buf
endfunc