channels: more consistent event handling

terminal: libvterm now receives data in async context. This was "almost" safe
already, as redraws were queued anyway.
This commit is contained in:
Björn Linse
2017-08-27 12:42:26 +02:00
parent f629f8312d
commit fee367a74f
2 changed files with 22 additions and 28 deletions

View File

@@ -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)