diff options
author | bfredl <bjorn.linse@gmail.com> | 2023-02-08 16:16:16 +0100 |
---|---|---|
committer | bfredl <bjorn.linse@gmail.com> | 2023-02-08 18:02:55 +0100 |
commit | 625e990976540a0e2d2bccb98deb57d0919d1e89 (patch) | |
tree | f411e64b684b5e4a4772c57ffaefe77cd63e7d8c /src/nvim/ui.c | |
parent | 1ca4a8b1ddf5256ad53cf486d0b2125434168270 (diff) | |
download | rneovim-625e990976540a0e2d2bccb98deb57d0919d1e89.tar.gz rneovim-625e990976540a0e2d2bccb98deb57d0919d1e89.tar.bz2 rneovim-625e990976540a0e2d2bccb98deb57d0919d1e89.zip |
refactor(ui): cleanup 'redrawdebug', introduce "flush" mode
Diffstat (limited to 'src/nvim/ui.c')
-rw-r--r-- | src/nvim/ui.c | 6 |
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 |