aboutsummaryrefslogtreecommitdiff
path: root/test/old
diff options
context:
space:
mode:
Diffstat (limited to 'test/old')
-rw-r--r--test/old/testdir/test_autocmd.vim24
-rw-r--r--test/old/testdir/test_cmdline.vim7
-rw-r--r--test/old/testdir/test_window_cmd.vim1
3 files changed, 28 insertions, 4 deletions
diff --git a/test/old/testdir/test_autocmd.vim b/test/old/testdir/test_autocmd.vim
index 40c09e61ac..d5f7c928de 100644
--- a/test/old/testdir/test_autocmd.vim
+++ b/test/old/testdir/test_autocmd.vim
@@ -4181,4 +4181,28 @@ func Test_autocmd_BufWinLeave_with_vsp()
exe "bw! " .. dummy
endfunc
+func Test_OptionSet_cmdheight()
+ set mouse=a laststatus=2
+ au OptionSet cmdheight :let &l:ch = v:option_new
+
+ resize -1
+ call assert_equal(2, &l:ch)
+ resize +1
+ call assert_equal(1, &l:ch)
+
+ call Ntest_setmouse(&lines - 1, 1)
+ call feedkeys("\<LeftMouse>", 'xt')
+ call Ntest_setmouse(&lines - 2, 1)
+ call feedkeys("\<LeftDrag>", 'xt')
+ call assert_equal(2, &l:ch)
+
+ tabnew | resize +1
+ call assert_equal(1, &l:ch)
+ tabfirst
+ call assert_equal(2, &l:ch)
+
+ tabonly
+ set cmdheight& mouse& laststatus&
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab
diff --git a/test/old/testdir/test_cmdline.vim b/test/old/testdir/test_cmdline.vim
index cbce0e908d..3fce086040 100644
--- a/test/old/testdir/test_cmdline.vim
+++ b/test/old/testdir/test_cmdline.vim
@@ -291,9 +291,10 @@ func Test_changing_cmdheight()
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>")
+ " :resize now also changes 'cmdheight' accordingly
+ call term_sendkeys(buf, ":set cmdheight+=1\<CR>")
call VerifyScreenDump(buf, 'Test_changing_cmdheight_2', {})
+ call term_sendkeys(buf, ":set cmdheight-=1\<CR>")
" using more space moves the status line up
call term_sendkeys(buf, ":set cmdheight+=1\<CR>")
@@ -312,7 +313,7 @@ func Test_changing_cmdheight()
call term_sendkeys(buf, ":call EchoTwo()\<CR>")
call VerifyScreenDump(buf, 'Test_changing_cmdheight_6', {})
- " increasing 'cmdheight' doesn't clear the messages that need hit-enter
+ " decreasing 'cmdheight' doesn't clear the messages that need hit-enter
call term_sendkeys(buf, ":call EchoOne()\<CR>")
call VerifyScreenDump(buf, 'Test_changing_cmdheight_7', {})
diff --git a/test/old/testdir/test_window_cmd.vim b/test/old/testdir/test_window_cmd.vim
index 343bc9fd83..24517f90cb 100644
--- a/test/old/testdir/test_window_cmd.vim
+++ b/test/old/testdir/test_window_cmd.vim
@@ -56,7 +56,6 @@ func Test_window_cmd_cmdwin_with_vsp()
endfunc
func Test_cmdheight_not_changed()
- throw 'Skipped: N/A'
set cmdheight=2
set winminheight=0
augroup Maximize