mirror of
https://github.com/neovim/neovim.git
synced 2025-09-22 11:18:19 +00:00
screen: fix problem with p_ch
When the screen is resized, p_ch is not re-set to the appropriate value. As a result, access to invalid addresses was occurring.
This commit is contained in:
@@ -7507,6 +7507,10 @@ void screen_resize(int width, int height)
|
||||
Rows = height;
|
||||
Columns = width;
|
||||
check_shellsize();
|
||||
int max_p_ch = Rows - min_rows() + 1;
|
||||
if (!ui_has(kUIMessages) && p_ch > max_p_ch) {
|
||||
p_ch = max_p_ch ? max_p_ch : 1;
|
||||
}
|
||||
height = Rows;
|
||||
width = Columns;
|
||||
p_lines = Rows;
|
||||
|
Reference in New Issue
Block a user