aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ui.c
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2023-02-08 18:36:36 +0100
committerGitHub <noreply@github.com>2023-02-08 18:36:36 +0100
commit7404f481ba8eb2291bef14323c0e6f9ee0157dfb (patch)
tree7f5f38ce47a69489534ed289a624b3a791d6a769 /src/nvim/ui.c
parent2294210660056df2f8abb277776cfd68f3fb1156 (diff)
parent28e26e05bc4cd2bd8e1abc2dd4d720fd9199456d (diff)
downloadrneovim-7404f481ba8eb2291bef14323c0e6f9ee0157dfb.tar.gz
rneovim-7404f481ba8eb2291bef14323c0e6f9ee0157dfb.tar.bz2
rneovim-7404f481ba8eb2291bef14323c0e6f9ee0157dfb.zip
Merge pull request #22172 from bfredl/cells
perf(ui): mitigate redraw latency regression from TUI refactor
Diffstat (limited to 'src/nvim/ui.c')
-rw-r--r--src/nvim/ui.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/nvim/ui.c b/src/nvim/ui.c
index 9f1cb87eb0..b22dc4a661 100644
--- a/src/nvim/ui.c
+++ b/src/nvim/ui.c
@@ -419,7 +419,7 @@ void ui_line(ScreenGrid *grid, int row, int startcol, int endcol, int clearcol,
(const sattr_T *)grid->attrs + off);
// 'writedelay': flush & delay each time.
- if (p_wd && !(rdb_flags & RDB_COMPOSITOR)) {
+ if (p_wd && (rdb_flags & RDB_LINE)) {
// If 'writedelay' is active, set the cursor to indicate what was drawn.
ui_call_grid_cursor_goto(grid->handle, row,
MIN(clearcol, (int)grid->cols - 1));
@@ -510,6 +510,10 @@ void ui_flush(void)
pending_has_mouse = has_mouse;
}
ui_call_flush();
+
+ if (p_wd && (rdb_flags & RDB_FLUSH)) {
+ os_microdelay((uint64_t)labs(p_wd) * 1000U, true);
+ }
}
/// Check if 'mouse' is active for the current mode