diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/drawline.c | 2 | ||||
-rw-r--r-- | src/nvim/getchar.c | 6 | ||||
-rw-r--r-- | src/nvim/grid.c | 10 |
3 files changed, 9 insertions, 9 deletions
diff --git a/src/nvim/drawline.c b/src/nvim/drawline.c index 1c7f649848..683bd61496 100644 --- a/src/nvim/drawline.c +++ b/src/nvim/drawline.c @@ -3287,5 +3287,5 @@ static void win_put_linebuf(win_T *wp, int row, int coloff, int endcol, int clea } grid_adjust(&grid, &row, &coloff); - grid_put_linebuf(grid, row, coloff, 0, endcol, clear_width, wp->w_p_rl, bg_attr, wrap, false); + grid_put_linebuf(grid, row, coloff, 0, endcol, clear_width, wp->w_p_rl, bg_attr, wrap); } diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c index 7c5d39bd70..5f3b143998 100644 --- a/src/nvim/getchar.c +++ b/src/nvim/getchar.c @@ -2861,8 +2861,10 @@ int inchar(uint8_t *buf, int maxlen, long wait_time) } // Always flush the output characters when getting input characters - // from the user. - ui_flush(); + // from the user and not just peeking. + if (wait_time == -1L || wait_time > 10L) { + ui_flush(); + } // Fill up to a third of the buffer, because each character may be // tripled below. 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; |