mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.1.1665: crash when popup window with mask is below the screen
Problem: Crash when popup window with mask is below the screen. Solution: Correct boundary check.
This commit is contained in:
@@ -2323,8 +2323,10 @@ update_popup_transparent(win_T *wp, int val)
|
||||
--lines;
|
||||
if (lines < 0)
|
||||
lines = 0;
|
||||
for (line = lines; line < linee && line < screen_Rows; ++line)
|
||||
for (col = cols; col < cole && col < screen_Columns; ++col)
|
||||
for (line = lines; line < linee
|
||||
&& line + wp->w_winrow < screen_Rows; ++line)
|
||||
for (col = cols; col < cole
|
||||
&& col + wp->w_wincol < screen_Columns; ++col)
|
||||
popup_transparent[(line + wp->w_winrow) * screen_Columns
|
||||
+ col + wp->w_wincol] = val;
|
||||
}
|
||||
|
Reference in New Issue
Block a user