diff options
author | bfredl <bjorn.linse@gmail.com> | 2023-10-03 20:56:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-03 20:56:43 +0200 |
commit | 70ec8d60e0dc71c5ca06fdd83698c82b16ea474f (patch) | |
tree | 329f78c3bef3a3d9332514b57dd57532695a03f9 /src/nvim/grid.c | |
parent | b2a8a9314798e18c0685faf7463bda32f691d755 (diff) | |
parent | a9a48d6b5f00241e16e7131c997f0117bc5e9047 (diff) | |
download | rneovim-70ec8d60e0dc71c5ca06fdd83698c82b16ea474f.tar.gz rneovim-70ec8d60e0dc71c5ca06fdd83698c82b16ea474f.tar.bz2 rneovim-70ec8d60e0dc71c5ca06fdd83698c82b16ea474f.zip |
Merge pull request #25470 from bfredl/msg_display
refactor(message): simplify msg_puts_display and use batched grid updates
Diffstat (limited to 'src/nvim/grid.c')
-rw-r--r-- | src/nvim/grid.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/nvim/grid.c b/src/nvim/grid.c index 712688368b..7a707407d2 100644 --- a/src/nvim/grid.c +++ b/src/nvim/grid.c @@ -455,6 +455,22 @@ void grid_line_flush(void) false, 0, false, invalid_row); } +/// flush grid line but only if on a valid row +/// +/// This is a stopgap until message.c has been refactored to behave +void grid_line_flush_if_valid_row(void) +{ + if (grid_line_row < 0 || grid_line_row >= grid_line_grid->rows) { + if (rdb_flags & RDB_INVALID) { + abort(); + } else { + grid_line_grid = NULL; + return; + } + } + grid_line_flush(); +} + /// Fill the grid from "start_row" to "end_row" (exclusive), from "start_col" /// to "end_col" (exclusive) with character "c1" in first column followed by /// "c2" in the other columns. Use attributes "attr". |