fix(folds): fix missing virt_lines above when fold is hidden (#24274)

This commit is contained in:
zeertzjq
2023-07-07 09:49:58 +08:00
committed by GitHub
parent 36941942d6
commit 811140e276
4 changed files with 81 additions and 8 deletions

View File

@@ -508,11 +508,9 @@ void grid_put_linebuf(ScreenGrid *grid, int row, int coloff, int endcol, int cle
// 2: occupies two display cells
int start_dirty = -1, end_dirty = 0;
assert(row < grid->rows);
// TODO(bfredl): check all callsites and eliminate
// Check for illegal row and col, just in case
if (row >= grid->rows) {
row = grid->rows - 1;
}
// Check for illegal col, just in case
if (endcol > grid->cols) {
endcol = grid->cols;
}