diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2017-08-27 12:42:26 +0200 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2017-11-25 09:37:00 +0100 |
commit | fee367a74f3269fd0543bae128c8aaee21f5e592 (patch) | |
tree | 167305b07b95ef3b243b36afcdc736155c842f30 /src/nvim/terminal.c | |
parent | f629f8312d2a830ce7999a6612203977ec83daf8 (diff) | |
download | rneovim-fee367a74f3269fd0543bae128c8aaee21f5e592.tar.gz rneovim-fee367a74f3269fd0543bae128c8aaee21f5e592.tar.bz2 rneovim-fee367a74f3269fd0543bae128c8aaee21f5e592.zip |
channels: more consistent event handling
terminal: libvterm now receives data in async context. This was "almost" safe
already, as redraws were queued anyway.
Diffstat (limited to 'src/nvim/terminal.c')
-rw-r--r-- | src/nvim/terminal.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/nvim/terminal.c b/src/nvim/terminal.c index 1dac9c69bd..dfa758f41e 100644 --- a/src/nvim/terminal.c +++ b/src/nvim/terminal.c @@ -1094,11 +1094,12 @@ static void refresh_terminal(Terminal *term) // Calls refresh_terminal() on all invalidated_terminals. static void refresh_timer_cb(TimeWatcher *watcher, void *data) { + refresh_pending = false; if (exiting // Cannot redraw (requires event loop) during teardown/exit. // WM_LIST (^D) is not redrawn, unlike the normal wildmenu. So we must // skip redraws to keep it visible. || wild_menu_showing == WM_LIST) { - goto end; + return; } Terminal *term; void *stub; (void)(stub); @@ -1113,8 +1114,6 @@ static void refresh_timer_cb(TimeWatcher *watcher, void *data) if (any_visible) { redraw(true); } -end: - refresh_pending = false; } static void refresh_size(Terminal *term, buf_T *buf) |