diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2016-02-29 05:04:59 -0500 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2018-02-07 09:25:51 +0100 |
commit | ed37136c5c85fbcbf98a071330025b3b0edbd065 (patch) | |
tree | aa159a400094de1858309ea80f0cb7b07de5f69e | |
parent | 352a51e8313d05c4701f468a79540a2410c77b23 (diff) | |
download | rneovim-ed37136c5c85fbcbf98a071330025b3b0edbd065.tar.gz rneovim-ed37136c5c85fbcbf98a071330025b3b0edbd065.tar.bz2 rneovim-ed37136c5c85fbcbf98a071330025b3b0edbd065.zip |
UI: restore 'writedelay' feature.
Removed by e0e41b30c61922e099a067ac5c137e745699a1aa, probably
unintentionally. Useful for ye olde redraw debugging.
TODO: Also delay redraw of statusline.
-rw-r--r-- | src/nvim/README.md | 6 | ||||
-rw-r--r-- | src/nvim/ui.c | 7 |
2 files changed, 13 insertions, 0 deletions
diff --git a/src/nvim/README.md b/src/nvim/README.md index 1ece92e44d..d668db0cdc 100644 --- a/src/nvim/README.md +++ b/src/nvim/README.md @@ -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` diff --git a/src/nvim/ui.c b/src/nvim/ui.c index 8aec923538..709a172449 100644 --- a/src/nvim/ui.c +++ b/src/nvim/ui.c @@ -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); + } } } |