diff src/testdir/screendump.vim @ 16477:8cc31b1b1d23 v8.1.1242

patch 8.1.1242: no cmdline redraw when tabpages have different 'cmdheight' commit https://github.com/vim/vim/commit/0fef0aeb1ca6c85df0a656a70b6ca49c34563c89 Author: Bram Moolenaar <Bram@vim.org> Date: Wed May 1 20:30:40 2019 +0200 patch 8.1.1242: no cmdline redraw when tabpages have different 'cmdheight' Problem: No cmdline redraw when tabpages have different 'cmdheight'. Solution: redraw the command line when 'cmdheight' changes when switching tabpages. (closes #4321)
author Bram Moolenaar <Bram@vim.org>
date Wed, 01 May 2019 20:45:05 +0200
parents b576f2e069b7
children 18ec0b92f431
line wrap: on
line diff
--- a/src/testdir/screendump.vim
+++ b/src/testdir/screendump.vim
@@ -26,6 +26,7 @@ source shared.vim
 " Options is a dictionary, these items are recognized:
 " "rows" - height of the terminal window (max. 20)
 " "cols" - width of the terminal window (max. 78)
+" "statusoff" - number of lines the status is offset from default
 func RunVimInTerminal(arguments, options)
   " If Vim doesn't exit a swap file remains, causing other tests to fail.
   " Remove it here.
@@ -51,6 +52,7 @@ func RunVimInTerminal(arguments, options
   " Make the window 20 lines high and 75 columns, unless told otherwise.
   let rows = get(a:options, 'rows', 20)
   let cols = get(a:options, 'cols', 75)
+  let statusoff = get(a:options, 'statusoff', 1)
 
   let cmd = GetVimCommandClean()
 
@@ -77,7 +79,7 @@ func RunVimInTerminal(arguments, options
   " using valgrind).
   " If it fails then show the terminal contents for debugging.
   try
-    call WaitFor({-> len(term_getline(buf, rows)) >= cols - 1 || len(term_getline(buf, rows - 1)) >= cols - 1})
+    call WaitFor({-> len(term_getline(buf, rows)) >= cols - 1 || len(term_getline(buf, rows - statusoff)) >= cols - 1})
   catch /timed out after/
     let lines = map(range(1, rows), {key, val -> term_getline(buf, val)})
     call assert_report('RunVimInTerminal() failed, screen contents: ' . join(lines, "<NL>"))