aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/grid.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-10-14 09:58:30 +0800
committerGitHub <noreply@github.com>2023-10-14 09:58:30 +0800
commitbf70a33f5e7de0218704126c149db24542e39766 (patch)
tree45190c96e29e86f2770ad1481fbf6d37794e76d4 /src/nvim/grid.c
parent9f32deba56ea867a8bb9b9ab7f44bcc5142e8bbc (diff)
downloadrneovim-bf70a33f5e7de0218704126c149db24542e39766.tar.gz
rneovim-bf70a33f5e7de0218704126c149db24542e39766.tar.bz2
rneovim-bf70a33f5e7de0218704126c149db24542e39766.zip
vim-patch:8.1.0822: peeking and flushing output slows down execution (#25629)
Problem: Peeking and flushing output slows down execution. Solution: Do not update the mode message when global_busy is set. Do not flush when only peeking for a character. (Ken Takata) https://github.com/vim/vim/commit/cb574f415486adff645ce384979bfecf27f5be8c
Diffstat (limited to 'src/nvim/grid.c')
-rw-r--r--src/nvim/grid.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/nvim/grid.c b/src/nvim/grid.c
index 9fe518e9fd..c16625a330 100644
--- a/src/nvim/grid.c
+++ b/src/nvim/grid.c
@@ -481,11 +481,8 @@ void grid_line_flush(void)
return;
}
- int row = grid_line_row;
-
- bool invalid_row = grid != &default_grid && grid_invalid_row(grid, row) && grid_line_first == 0;
- grid_put_linebuf(grid, row, grid_line_coloff, grid_line_first, grid_line_last, grid_line_last,
- false, 0, false, invalid_row);
+ grid_put_linebuf(grid, grid_line_row, grid_line_coloff, grid_line_first, grid_line_last,
+ grid_line_last, false, 0, false);
}
/// flush grid line but only if on a valid row
@@ -620,7 +617,7 @@ static int grid_char_needs_redraw(ScreenGrid *grid, int col, size_t off_to, int
/// If "wrap" is true, then hint to the UI that "row" contains a line
/// which has wrapped into the next row.
void grid_put_linebuf(ScreenGrid *grid, int row, int coloff, int col, int endcol, int clear_width,
- bool rl, int bg_attr, bool wrap, bool invalid_row)
+ bool rl, int bg_attr, bool wrap)
{
bool redraw_next; // redraw_this for next character
bool clear_next = false;
@@ -639,6 +636,7 @@ void grid_put_linebuf(ScreenGrid *grid, int row, int coloff, int col, int endcol
return;
}
+ bool invalid_row = grid != &default_grid && grid_invalid_row(grid, row) && col == 0;
size_t off_to = grid->line_offset[row] + (size_t)coloff;
const size_t max_off_to = grid->line_offset[row] + (size_t)grid->cols;