1
0
forked from aniani/vim

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)
This commit is contained in:
Bram Moolenaar
2020-12-29 12:46:51 +01:00
parent 4012d26207
commit 89015a6759
3 changed files with 12 additions and 0 deletions

View File

@@ -5687,6 +5687,8 @@ win_setwidth_win(int width, win_T *wp)
if (width == 0)
width = 1;
}
else if (width < 0)
width = 0;
frame_setwidth(wp->w_frame, width + wp->w_vsep_width);