summaryrefslogtreecommitdiff
path: root/src/testdir/test_cmdline.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-08-11 13:17:30 +0100
committerBram Moolenaar <Bram@vim.org>2022-08-11 13:17:30 +0100
commitf797e309caff48f7a56c73b16e62ff67c4dcbdd6 (patch)
treefea4b3c7e732530173cdfb9086aeeda32bc6c466 /src/testdir/test_cmdline.vim
parent87f3a2ca3d0ffbfa7389bbb89add4d8d3fca6fbb (diff)
downloadvim-git-f797e309caff48f7a56c73b16e62ff67c4dcbdd6.tar.gz
patch 9.0.0190: the way 'cmdheight' can be made zero is inconsistentv9.0.0190
Problem: The way 'cmdheight' can be made zero is inconsistent. Solution: Only make 'cmdheight' zero when setting it explicitly, not when resizing windows. (closes #10890)
Diffstat (limited to 'src/testdir/test_cmdline.vim')
-rw-r--r--src/testdir/test_cmdline.vim29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/testdir/test_cmdline.vim b/src/testdir/test_cmdline.vim
index 912f3a5d1..92adbd10b 100644
--- a/src/testdir/test_cmdline.vim
+++ b/src/testdir/test_cmdline.vim
@@ -215,6 +215,35 @@ func Test_redraw_in_autocmd()
call delete('XTest_redraw')
endfunc
+func Test_changing_cmdheight()
+ CheckScreendump
+
+ let lines =<< trim END
+ set cmdheight=1 laststatus=2
+ END
+ call writefile(lines, 'XTest_cmdheight')
+
+ let buf = RunVimInTerminal('-S XTest_cmdheight', {'rows': 8})
+ call term_sendkeys(buf, ":resize -3\<CR>")
+ call VerifyScreenDump(buf, 'Test_changing_cmdheight_1', {})
+
+ " using the space available doesn't change the status line
+ call term_sendkeys(buf, ":set cmdheight+=3\<CR>")
+ call VerifyScreenDump(buf, 'Test_changing_cmdheight_2', {})
+
+ " using more space moves the status line up
+ call term_sendkeys(buf, ":set cmdheight+=1\<CR>")
+ call VerifyScreenDump(buf, 'Test_changing_cmdheight_3', {})
+
+ " reducing cmdheight moves status line down
+ call term_sendkeys(buf, ":set cmdheight-=2\<CR>")
+ call VerifyScreenDump(buf, 'Test_changing_cmdheight_4', {})
+
+ " clean up
+ call StopVimInTerminal(buf)
+ call delete('XTest_cmdheight')
+endfunc
+
func Test_map_completion()
call feedkeys(":map <unique> <si\<Tab>\<Home>\"\<CR>", 'xt')
call assert_equal('"map <unique> <silent>', getreg(':'))