aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorShougo Matsushita <Shougo.Matsu@gmail.com>2022-08-16 14:45:31 +0900
committerzeertzjq <zeertzjq@outlook.com>2022-08-17 09:34:13 +0800
commit5977a96b3fa8283862d5768daebdbdaae84a8b3d (patch)
tree2a85021d1b09457cd87dc32e8b6e65b929c7591d /src/nvim/testdir
parentd74f9c3b947677a98103c41e0c4ad8ae54389c4e (diff)
downloadrneovim-5977a96b3fa8283862d5768daebdbdaae84a8b3d.tar.gz
rneovim-5977a96b3fa8283862d5768daebdbdaae84a8b3d.tar.bz2
rneovim-5977a96b3fa8283862d5768daebdbdaae84a8b3d.zip
vim-patch:9.0.0190: the way 'cmdheight' can be made zero is inconsistent
Problem: The way 'cmdheight' can be made zero is inconsistent. Solution: Only make 'cmdheight' zero when setting it explicitly, not when resizing windows. (closes vim/vim#10890) https://github.com/vim/vim/commit/f797e309caff48f7a56c73b16e62ff67c4dcbdd6
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_cmdline.vim29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_cmdline.vim b/src/nvim/testdir/test_cmdline.vim
index b9eefa937a..cac1491d63 100644
--- a/src/nvim/testdir/test_cmdline.vim
+++ b/src/nvim/testdir/test_cmdline.vim
@@ -126,6 +126,35 @@ func Test_wildmenu_screendump()
call delete('XTest_wildmenu')
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()
if !has('cmdline_compl')
return