diff options
| author | bfredl <bjorn.linse@gmail.com> | 2022-12-30 19:49:59 +0100 |
|---|---|---|
| committer | bfredl <bjorn.linse@gmail.com> | 2022-12-30 19:56:11 +0100 |
| commit | 09370eae7756b07bb8f1f116b690b22aec7ec563 (patch) | |
| tree | 2bd937bae9748d54cff50da0c091503b663fe997 /src/nvim/tui | |
| parent | 4ace9e7e417fe26c8b73ff1d6042e6e4f3df9ebf (diff) | |
| download | rneovim-09370eae7756b07bb8f1f116b690b22aec7ec563.tar.gz rneovim-09370eae7756b07bb8f1f116b690b22aec7ec563.tar.bz2 rneovim-09370eae7756b07bb8f1f116b690b22aec7ec563.zip | |
refactor(sleep): simplify rube goldberg implementation of :sleep
As neovim does have event handling, we are checking for CTRL-C
all the time, not once per second.
Also, do_sleep() reimplements the same loop as
LOOP_PROCESS_EVENTS_UNTIL() already contains internally. Fix the latter
to use the right integer type, so we do not need the extra indirection.
Diffstat (limited to 'src/nvim/tui')
| -rw-r--r-- | src/nvim/tui/tui.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/tui/tui.c b/src/nvim/tui/tui.c index 3010a7b612..e32e48ce91 100644 --- a/src/nvim/tui/tui.c +++ b/src/nvim/tui/tui.c @@ -1747,7 +1747,7 @@ static void pad(void *ctx, size_t delay, int scale FUNC_ATTR_UNUSED, int force) } flush_buf(ui); - loop_uv_run(data->loop, (int)(delay / 10), false); + loop_uv_run(data->loop, (int64_t)(delay / 10), false); } static void unibi_set_if_empty(unibi_term *ut, enum unibi_string str, const char *val) |