mirror of
https://github.com/neovim/neovim.git
synced 2025-10-09 19:36:40 +00:00
vim-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 vim/vim#4321)
0fef0aeb1c
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
" Tests for tabpage
|
||||
|
||||
" source screendump.vim
|
||||
|
||||
function Test_tabpage()
|
||||
bw!
|
||||
@@ -555,4 +556,27 @@ func Test_tabs()
|
||||
bw!
|
||||
endfunc
|
||||
|
||||
func Test_tabpage_cmdheight()
|
||||
if !CanRunVimInTerminal()
|
||||
throw 'Skipped: only works with terminal'
|
||||
endif
|
||||
call writefile([
|
||||
\ 'set laststatus=2',
|
||||
\ 'set cmdheight=2',
|
||||
\ 'tabnew',
|
||||
\ 'set cmdheight=3',
|
||||
\ 'tabnext',
|
||||
\ 'redraw!',
|
||||
\ 'echo "hello\nthere"',
|
||||
\ 'tabnext',
|
||||
\ 'redraw',
|
||||
\ ], 'XTest_tabpage_cmdheight')
|
||||
" Check that cursor line is concealed
|
||||
let buf = RunVimInTerminal('-S XTest_tabpage_cmdheight', {'statusoff': 3})
|
||||
call VerifyScreenDump(buf, 'Test_tabpage_cmdheight', {})
|
||||
|
||||
call StopVimInTerminal(buf)
|
||||
call delete('XTest_conceal')
|
||||
endfunc
|
||||
|
||||
" vim: shiftwidth=2 sts=2 expandtab
|
||||
|
@@ -3793,6 +3793,9 @@ static void enter_tabpage(tabpage_T *tp, buf_T *old_curbuf, int trigger_enter_au
|
||||
* the frames for that. When the Vim window was resized need to update
|
||||
* frame sizes too. Use the stored value of p_ch, so that it can be
|
||||
* different for each tab page. */
|
||||
if (p_ch != curtab->tp_ch_used) {
|
||||
clear_cmdline = true;
|
||||
}
|
||||
p_ch = curtab->tp_ch_used;
|
||||
if (curtab->tp_old_Rows != Rows || (old_off != firstwin->w_winrow
|
||||
))
|
||||
|
Reference in New Issue
Block a user