aboutsummaryrefslogtreecommitdiff
path: root/test/old/testdir/test_cmdwin.vim
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-05-13 22:39:28 +0800
committerzeertzjq <zeertzjq@outlook.com>2023-05-13 22:45:59 +0800
commitcd9ca700e5053f8a9666c917310dcc39651e3bfa (patch)
treee960618fe3e508a432ee9b814a387f8bf8c22024 /test/old/testdir/test_cmdwin.vim
parent2de3362ce3877b622a26c21214c95c69892b8c63 (diff)
downloadrneovim-cd9ca700e5053f8a9666c917310dcc39651e3bfa.tar.gz
rneovim-cd9ca700e5053f8a9666c917310dcc39651e3bfa.tar.bz2
rneovim-cd9ca700e5053f8a9666c917310dcc39651e3bfa.zip
vim-patch:9.0.0598: using negative array index with negative width window
Problem: Using negative array index with negative width window. Solution: Make sure the window width does not become negative. https://github.com/vim/vim/commit/8279af514ca7e5fd3c31cf13b0864163d1a0bfeb Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'test/old/testdir/test_cmdwin.vim')
-rw-r--r--test/old/testdir/test_cmdwin.vim22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/old/testdir/test_cmdwin.vim b/test/old/testdir/test_cmdwin.vim
index 4284f0f58d..f948d46be1 100644
--- a/test/old/testdir/test_cmdwin.vim
+++ b/test/old/testdir/test_cmdwin.vim
@@ -41,5 +41,27 @@ func Test_cmdwin_freed_buffer_ptr()
bwipe!
endfunc
+" This was resulting in a window with negative width.
+" The test doesn't reproduce the illegal memory access though...
+func Test_cmdwin_split_often()
+ let lines = &lines
+ let columns = &columns
+ set t_WS=
+
+ try
+ " set encoding=iso8859
+ set ruler
+ winsize 0 0
+ noremap 0 H
+ sil norm 0000000q:
+ catch /E36:/
+ endtry
+
+ bwipe!
+ set encoding=utf8
+ let &lines = lines
+ let &columns = columns
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab