diff options
-rw-r--r-- | runtime/doc/options.txt | 5 | ||||
-rw-r--r-- | src/nvim/screen.c | 3 | ||||
-rw-r--r-- | src/nvim/ui.c | 5 |
3 files changed, 7 insertions, 6 deletions
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index fbc055ddd5..9ef5ccb5c5 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -6922,7 +6922,8 @@ A jump table for the options with a short description can be found at |Q_op|. 'writedelay' 'wd' number (default 0) global The number of milliseconds to wait for each character sent to the - screen. When non-zero, characters are sent to the terminal one by - one. For debugging purposes. + screen. When positive, characters are sent to the UI one by one. + When negative, all redrawn characters cause a delay, even if the + character already was displayed by the UI. For debugging purposes. vim:tw=78:ts=8:ft=help:noet:norl: diff --git a/src/nvim/screen.c b/src/nvim/screen.c index b4cdbbd824..c13e68f8a1 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -4361,7 +4361,8 @@ static int char_needs_redraw(int off_from, int off_to, int cols) && comp_char_differs(off_from, off_to)) || ((*mb_off2cells)(off_from, off_from + cols) > 1 && ScreenLines[off_from + 1] - != ScreenLines[off_to + 1]))))); + != ScreenLines[off_to + 1]))) + || p_wd < 0)); } /* diff --git a/src/nvim/ui.c b/src/nvim/ui.c index 241d70e1b1..f4d3cd987d 100644 --- a/src/nvim/ui.c +++ b/src/nvim/ui.c @@ -437,9 +437,8 @@ void ui_puts(uint8_t *str) 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); + uint64_t wd = (uint64_t)labs(p_wd); + os_delay(wd, false); } } } |