aboutsummaryrefslogtreecommitdiff
path: root/test/old/testdir/test_autocmd.vim
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2025-02-05 23:09:29 +0000
committerJosh Rahm <joshuarahm@gmail.com>2025-02-05 23:09:29 +0000
commitd5f194ce780c95821a855aca3c19426576d28ae0 (patch)
treed45f461b19f9118ad2bb1f440a7a08973ad18832 /test/old/testdir/test_autocmd.vim
parentc5d770d311841ea5230426cc4c868e8db27300a8 (diff)
parent44740e561fc93afe3ebecfd3618bda2d2abeafb0 (diff)
downloadrneovim-rahm.tar.gz
rneovim-rahm.tar.bz2
rneovim-rahm.zip
Merge remote-tracking branch 'upstream/master' into mix_20240309HEADrahm
Diffstat (limited to 'test/old/testdir/test_autocmd.vim')
-rw-r--r--test/old/testdir/test_autocmd.vim28
1 files changed, 26 insertions, 2 deletions
diff --git a/test/old/testdir/test_autocmd.vim b/test/old/testdir/test_autocmd.vim
index 64599c869a..d5f7c928de 100644
--- a/test/old/testdir/test_autocmd.vim
+++ b/test/old/testdir/test_autocmd.vim
@@ -1198,8 +1198,8 @@ func Test_OptionSet()
call assert_equal(g:opt[0], g:opt[1])
" 14: Setting option backspace through :let"
- let g:options = [['backspace', '', '', '', 'eol,indent,start', 'global', 'set']]
- let &bs = "eol,indent,start"
+ let g:options = [['backspace', 'indent,eol,start', 'indent,eol,start', 'indent,eol,start', '', 'global', 'set']]
+ let &bs = ''
call assert_equal([], g:options)
call assert_equal(g:opt[0], g:opt[1])
@@ -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