Patch 8.2.2244
Problem: Crash when making the window width of the not-current window
negative.
Solution: Make sure the window width is not negative. (closes #7568)
Files: src/window.c, src/testdir/test_window_cmd.vim
*** ../vim-8.2.2243/src/window.c 2020-12-28 15:41:37.171352372 +0100
--- src/window.c 2020-12-29 12:46:23.474528850 +0100
***************
*** 5687,5692 ****
--- 5687,5694 ----
if (width == 0)
width = 1;
}
+ else if (width < 0)
+ width = 0;
frame_setwidth(wp->w_frame, width + wp->w_vsep_width);
*** ../vim-8.2.2243/src/testdir/test_window_cmd.vim 2020-10-17 17:39:51.821046489 +0200
--- src/testdir/test_window_cmd.vim 2020-12-29 12:45:37.566664281 +0100
***************
*** 1148,1153 ****
--- 1148,1161 ----
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
*** ../vim-8.2.2243/src/version.c 2020-12-29 11:57:42.647631659 +0100
--- src/version.c 2020-12-29 12:41:37.787372925 +0100
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 2244,
/**/
--
Nothing is fool-proof to a sufficiently talented fool.
/// Bram Moolenaar -- Br...@Moolenaar.net --
http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features --
http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language --
http://www.Zimbu.org ///
\\\ help me help AIDS victims --
http://ICCF-Holland.org ///