mirror of
https://github.com/neovim/neovim.git
synced 2025-09-22 03:08:27 +00:00
compositor: handle invalid screen positions after resize gracefully
The screen resize logic needs to be refactored to be simpler and more deterministic. Until then, we need to handle attempts to draw outside of the screen size gracefully, just like the old vim code did. fixes #9989
This commit is contained in:
@@ -4375,7 +4375,7 @@ static void grid_put_linebuf(ScreenGrid *grid, int row, int coloff, int endcol,
|
||||
screen_adjust_grid(&grid, &row, &coloff);
|
||||
|
||||
// Safety check. Avoids clang warnings down the call stack.
|
||||
if (grid->chars == NULL || row >= grid->Rows || col >= grid->Columns) {
|
||||
if (grid->chars == NULL || row >= grid->Rows || coloff >= grid->Columns) {
|
||||
DLOG("invalid state, skipped");
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user