aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_window_cmd.vim
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-04-20 10:26:33 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-04-21 19:06:50 +0800
commit9b10b4cc6463d901b893ad2d522c629d066607d5 (patch)
treebc4535891976b838e7b322bebab0696a7fd10bcf /src/nvim/testdir/test_window_cmd.vim
parent5c4ec254784e7e92f61b69114c6091a198fe600f (diff)
downloadrneovim-9b10b4cc6463d901b893ad2d522c629d066607d5.tar.gz
rneovim-9b10b4cc6463d901b893ad2d522c629d066607d5.tar.bz2
rneovim-9b10b4cc6463d901b893ad2d522c629d066607d5.zip
vim-patch:8.1.1756: autocommand that splits window messes up window layout
Problem: Autocommand that splits window messes up window layout. Solution: Disallow splitting a window while closing one. In ":all" give an error when moving a window will not work. https://github.com/vim/vim/commit/1417c766f55e5959b31da488417b7d9b141404af Expected error number was changed to E242 in Vim in patch 8.2.1183, and patch 8.2.2420 (which has already been ported) made the test no longer throw E249 in Vim, so just use E242 in the test.
Diffstat (limited to 'src/nvim/testdir/test_window_cmd.vim')
-rw-r--r--src/nvim/testdir/test_window_cmd.vim5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nvim/testdir/test_window_cmd.vim b/src/nvim/testdir/test_window_cmd.vim
index ef6dec580f..798122dc5d 100644
--- a/src/nvim/testdir/test_window_cmd.vim
+++ b/src/nvim/testdir/test_window_cmd.vim
@@ -513,14 +513,15 @@ func Test_window_colon_command()
endfunc
func Test_access_freed_mem()
+ call assert_equal(&columns, winwidth(0))
" This was accessing freed memory (but with what events?)
au BufEnter,BufLeave,WinEnter,WinLeave 0 vs xxx
arg 0
argadd
- all
- all
+ call assert_fails("all", "E242:")
au!
bwipe xxx
+ call assert_equal(&columns, winwidth(0))
endfunc
func Test_visual_cleared_after_window_split()