mirror of
https://github.com/neovim/neovim.git
synced 2024-12-31 17:13:26 -07:00
ui_detach: Do not redraw during teardown/exit.
This commit is contained in:
parent
d670591887
commit
59f12e7d61
@ -977,9 +977,7 @@ static void refresh_terminal(Terminal *term)
|
|||||||
// event.
|
// event.
|
||||||
static void refresh_timer_cb(TimeWatcher *watcher, void *data)
|
static void refresh_timer_cb(TimeWatcher *watcher, void *data)
|
||||||
{
|
{
|
||||||
if (exiting) {
|
if (exiting) { // Cannot redraw (requires event loop) during teardown/exit.
|
||||||
// bad things can happen if we redraw when exiting, and there's no need to
|
|
||||||
// update the buffer.
|
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
Terminal *term;
|
Terminal *term;
|
||||||
|
@ -258,7 +258,10 @@ void ui_detach_impl(UI *ui)
|
|||||||
shift_index++;
|
shift_index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (--ui_count) {
|
if (--ui_count
|
||||||
|
// During teardown/exit the loop was already destroyed, cannot schedule.
|
||||||
|
// https://github.com/neovim/neovim/pull/5119#issuecomment-258667046
|
||||||
|
&& !exiting) {
|
||||||
ui_schedule_refresh();
|
ui_schedule_refresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user