From 0816f473ab2f6cf7d8311c0f97371cada7f20d18 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 5 Oct 2022 15:42:32 +0100 Subject: patch 9.0.0665: setting 'cmdheight' has no effect if last window was resized Problem: Setting 'cmdheight' has no effect if last window was resized. Solution: Do apply 'cmdheight' when told to. Use the frame height instead of the cmdline_row. (closes #11286) --- src/testdir/test_cmdline.vim | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/testdir/test_cmdline.vim') diff --git a/src/testdir/test_cmdline.vim b/src/testdir/test_cmdline.vim index 00939f910..3cfdd7648 100644 --- a/src/testdir/test_cmdline.vim +++ b/src/testdir/test_cmdline.vim @@ -248,6 +248,13 @@ func Test_changing_cmdheight() let lines =<< trim END set cmdheight=1 laststatus=2 + func EchoTwo() + set laststatus=2 + set cmdheight=5 + echo 'foo' + echo 'bar' + set cmdheight=1 + endfunc END call writefile(lines, 'XTest_cmdheight', 'D') @@ -272,6 +279,10 @@ func Test_changing_cmdheight() call term_sendkeys(buf, ":set cmdheight=1\") call VerifyScreenDump(buf, 'Test_changing_cmdheight_5', {}) + " setting 'cmdheight' works after outputting two messages + call term_sendkeys(buf, ":call EchoTwo()\") + call VerifyScreenDump(buf, 'Test_changing_cmdheight_6', {}) + " clean up call StopVimInTerminal(buf) endfunc -- cgit v1.2.1