From: Bram Moolenaar Date: Sun, 25 Mar 2018 16:56:25 +0000 (+0200) Subject: patch 8.0.1642: running Vim in terminal fails with two windows X-Git-Tag: v8.0.1642 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=15a1c3fdc19499c267e4dc664aa0de9d65a08cad;p=vim patch 8.0.1642: running Vim in terminal fails with two windows Problem: Running Vim in terminal fails with two windows. Solution: Pass the number of rows to RunVimInTerminal(). --- diff --git a/src/testdir/screendump.vim b/src/testdir/screendump.vim index 093b483f1..60c0ccb01 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 diff --git a/src/testdir/test_terminal.vim b/src/testdir/test_terminal.vim index a7e5f6168..6f655185f 100644 --- a/src/testdir/test_terminal.vim +++ b/src/testdir/test_terminal.vim @@ -1064,7 +1064,7 @@ func Test_terminal_api_drop_oldwin() \ 'redraw', \ "set t_ts=", \ ], 'Xscript') - let buf = RunVimInTerminal('-S Xscript', {}) + let buf = RunVimInTerminal('-S Xscript', {'rows': 10}) call WaitFor({-> expand('%:t') =='Xtextfile'}) call assert_equal(textfile_winid, win_getid()) diff --git a/src/version.c b/src/version.c index 3295eb089..c648d52c3 100644 --- a/src/version.c +++ b/src/version.c @@ -766,6 +766,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1642, /**/ 1641, /**/