diff src/testdir/test_window_cmd.vim @ 23402:65718283239b v8.2.2244

patch 8.2.2244: crash when making the window width negative Commit: https://github.com/vim/vim/commit/89015a675990bd7d70e041c5d890edb803b5c6b7 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Dec 29 12:46:51 2020 +0100 patch 8.2.2244: crash when making the window width negative Problem: Crash when making the window width of the not-current window negative. Solution: Make sure the window width is not negative. (closes #7568)
author Bram Moolenaar <Bram@vim.org>
date Tue, 29 Dec 2020 13:00:35 +0100
parents f773ac13c093
children 0fe2cdcff19b
line wrap: on
line diff
--- a/src/testdir/test_window_cmd.vim
+++ b/src/testdir/test_window_cmd.vim
@@ -1148,6 +1148,14 @@ func Test_window_resize()
   exe other_winnr .. 'resize +1'
   call assert_equal(12, winheight(other_winnr))
   call assert_equal(&lines - 10 - 3 -2, winheight(0))
+  close
+
+  vsplit
+  wincmd l
+  let other_winnr = winnr('h')
+  call assert_notequal(winnr(), other_winnr)
+  exe 'vert ' .. other_winnr .. 'resize -100'
+  call assert_equal(0, winwidth(other_winnr))
 
   %bwipe!
 endfunc