From fee367a74f3269fd0543bae128c8aaee21f5e592 Mon Sep 17 00:00:00 2001 From: Björn Linse Date: Sun, 27 Aug 2017 12:42:26 +0200 Subject: channels: more consistent event handling terminal: libvterm now receives data in async context. This was "almost" safe already, as redraws were queued anyway. --- src/nvim/terminal.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/nvim/terminal.c') 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) -- cgit