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:
Justin M. Keyes
2016-02-29 05:04:59 -05:00
parent 352a51e831
commit ed37136c5c
2 changed files with 13 additions and 0 deletions

View File

@@ -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`

View File

@@ -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);
}
}
}