comparison 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
comparison
equal deleted inserted replaced
16476:9f2336fa44b9 16477:8cc31b1b1d23
24 " Returns the buffer number of the terminal. 24 " Returns the buffer number of the terminal.
25 " 25 "
26 " Options is a dictionary, these items are recognized: 26 " Options is a dictionary, these items are recognized:
27 " "rows" - height of the terminal window (max. 20) 27 " "rows" - height of the terminal window (max. 20)
28 " "cols" - width of the terminal window (max. 78) 28 " "cols" - width of the terminal window (max. 78)
29 " "statusoff" - number of lines the status is offset from default
29 func RunVimInTerminal(arguments, options) 30 func RunVimInTerminal(arguments, options)
30 " If Vim doesn't exit a swap file remains, causing other tests to fail. 31 " If Vim doesn't exit a swap file remains, causing other tests to fail.
31 " Remove it here. 32 " Remove it here.
32 call delete(".swp") 33 call delete(".swp")
33 34
49 hi Normal ctermfg=NONE ctermbg=NONE 50 hi Normal ctermfg=NONE ctermbg=NONE
50 51
51 " Make the window 20 lines high and 75 columns, unless told otherwise. 52 " Make the window 20 lines high and 75 columns, unless told otherwise.
52 let rows = get(a:options, 'rows', 20) 53 let rows = get(a:options, 'rows', 20)
53 let cols = get(a:options, 'cols', 75) 54 let cols = get(a:options, 'cols', 75)
55 let statusoff = get(a:options, 'statusoff', 1)
54 56
55 let cmd = GetVimCommandClean() 57 let cmd = GetVimCommandClean()
56 58
57 " Add -v to have gvim run in the terminal (if possible) 59 " Add -v to have gvim run in the terminal (if possible)
58 let cmd .= ' -v ' . a:arguments 60 let cmd .= ' -v ' . a:arguments
75 " Wait for "All" or "Top" of the ruler to be shown in the last line or in 77 " Wait for "All" or "Top" of the ruler to be shown in the last line or in
76 " the status line of the last window. This can be quite slow (e.g. when 78 " the status line of the last window. This can be quite slow (e.g. when
77 " using valgrind). 79 " using valgrind).
78 " If it fails then show the terminal contents for debugging. 80 " If it fails then show the terminal contents for debugging.
79 try 81 try
80 call WaitFor({-> len(term_getline(buf, rows)) >= cols - 1 || len(term_getline(buf, rows - 1)) >= cols - 1}) 82 call WaitFor({-> len(term_getline(buf, rows)) >= cols - 1 || len(term_getline(buf, rows - statusoff)) >= cols - 1})
81 catch /timed out after/ 83 catch /timed out after/
82 let lines = map(range(1, rows), {key, val -> term_getline(buf, val)}) 84 let lines = map(range(1, rows), {key, val -> term_getline(buf, val)})
83 call assert_report('RunVimInTerminal() failed, screen contents: ' . join(lines, "<NL>")) 85 call assert_report('RunVimInTerminal() failed, screen contents: ' . join(lines, "<NL>"))
84 endtry 86 endtry
85 87