diff options
author | Christian Brabandt <cb@256bit.org> | 2024-01-12 17:34:40 +0100 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2024-01-12 17:34:40 +0100 |
commit | 8610f74382039c9c54d6c4aeb978d252e762360a (patch) | |
tree | 039a6fbf21637fca9898082edef0b0a06af33aac /src/testdir/test_cmdline.vim | |
parent | b52600d5613316e5b6e89514a02df1f97e27a5ff (diff) |
patch 9.1.0019: cmdline may disappear when changing 'cmdheight'v9.1.0019
Problem: cmdline may disappear when changing 'cmdheight'
(after Patch 9.0.0190, @markonm)
Solution: always re-calculate the old_p_ch value, not only
when cmdline_row was higher than expected
fixes: #13822
closes: #13826
Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'src/testdir/test_cmdline.vim')
-rw-r--r-- | src/testdir/test_cmdline.vim | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/testdir/test_cmdline.vim b/src/testdir/test_cmdline.vim index 4554712670..ea95cbfce5 100644 --- a/src/testdir/test_cmdline.vim +++ b/src/testdir/test_cmdline.vim @@ -3742,4 +3742,17 @@ func Test_custom_completion_with_glob() delfunc TestGlobComplete endfunc +func Test_window_size_stays_same_after_changing_cmdheight() + set laststatus=2 + let expected = winheight(0) + function! Function_name() abort + call feedkeys(":"..repeat('x', &columns), 'x') + let &cmdheight=2 + let &cmdheight=1 + redraw + endfunction + call Function_name() + call assert_equal(expected, winheight(0)) +endfunc + " vim: shiftwidth=2 sts=2 expandtab |