commit | 89015a675990bd7d70e041c5d890edb803b5c6b7 | [log] [tgz] |
---|---|---|
author | Bram Moolenaar <Bram@vim.org> | Tue Dec 29 12:46:51 2020 +0100 |
committer | Bram Moolenaar <Bram@vim.org> | Tue Dec 29 12:46:51 2020 +0100 |
tree | e7e1b1a4820ea46641789f2bb15bd90be04d4142 | |
parent | 4012d262072a3ac95878c9d061fa985301720ec2 [diff] [blame] |
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)
diff --git a/src/window.c b/src/window.c index 1cf795f..bea4f39 100644 --- a/src/window.c +++ b/src/window.c
@@ -5687,6 +5687,8 @@ if (width == 0) width = 1; } + else if (width < 0) + width = 0; frame_setwidth(wp->w_frame, width + wp->w_vsep_width);