diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-07-07 09:49:58 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-07 09:49:58 +0800 |
commit | 811140e276a6312775bfcf9b368de25386f7a356 (patch) | |
tree | 3db5a35e1daac65987190fb48431dc919a29cca4 /src/nvim/grid.c | |
parent | 36941942d60915d9f78defd6aaf713a27952e16a (diff) | |
download | rneovim-811140e276a6312775bfcf9b368de25386f7a356.tar.gz rneovim-811140e276a6312775bfcf9b368de25386f7a356.tar.bz2 rneovim-811140e276a6312775bfcf9b368de25386f7a356.zip |
fix(folds): fix missing virt_lines above when fold is hidden (#24274)
Diffstat (limited to 'src/nvim/grid.c')
-rw-r--r-- | src/nvim/grid.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/nvim/grid.c b/src/nvim/grid.c index 11cd691f22..aef10db414 100644 --- a/src/nvim/grid.c +++ b/src/nvim/grid.c @@ -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; } |