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)
diff --git a/src/testdir/test_cmdline.vim b/src/testdir/test_cmdline.vim
index 00939f9..3cfdd76 100644
--- a/src/testdir/test_cmdline.vim
+++ b/src/testdir/test_cmdline.vim
@@ -248,6 +248,13 @@
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 @@
call term_sendkeys(buf, ":set cmdheight=1\<CR>")
call VerifyScreenDump(buf, 'Test_changing_cmdheight_5', {})
+ " setting 'cmdheight' works after outputting two messages
+ call term_sendkeys(buf, ":call EchoTwo()\<CR>")
+ call VerifyScreenDump(buf, 'Test_changing_cmdheight_6', {})
+
" clean up
call StopVimInTerminal(buf)
endfunc