mirror of
https://github.com/neovim/neovim.git
synced 2026-04-21 06:45:37 +00:00
UI: restore 'writedelay' feature.
Removed by e0e41b30c6, probably
unintentionally. Useful for ye olde redraw debugging.
TODO: Also delay redraw of statusline.
This commit is contained in:
@@ -90,6 +90,12 @@ Record a Nvim terminal session and format it with `vterm-dump`:
|
||||
|
||||
Then you can compare `bar` with another session, to debug TUI behavior.
|
||||
|
||||
### TUI redraw
|
||||
|
||||
Set the 'writedelay' option to see where and when the UI is painted.
|
||||
|
||||
:set writedelay=1
|
||||
|
||||
### Terminal reference
|
||||
|
||||
- `man terminfo`
|
||||
|
||||
@@ -453,6 +453,13 @@ void ui_puts(uint8_t *str)
|
||||
ui_linefeed();
|
||||
}
|
||||
p += clen;
|
||||
|
||||
if (p_wd) { // 'writedelay': flush & delay each time.
|
||||
ui_flush();
|
||||
assert(p_wd >= 0
|
||||
&& (sizeof(long) <= sizeof(uint64_t) || p_wd <= UINT64_MAX));
|
||||
os_delay((uint64_t)p_wd, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user