mirror of
https://github.com/neovim/neovim.git
synced 2025-10-05 17:36:29 +00:00
ui_bridge: make sure TUI receives no more UI events after "stop" event
This commit is contained in:
@@ -106,6 +106,9 @@ static void ui_thread_run(void *data)
|
||||
|
||||
static void ui_bridge_stop(UI *b)
|
||||
{
|
||||
// Detach brigde first, so that "stop" is the last event the TUI loop
|
||||
// receives from the main thread. #8041
|
||||
ui_detach_impl(b);
|
||||
UIBridgeData *bridge = (UIBridgeData *)b;
|
||||
bool stopped = bridge->stopped = false;
|
||||
UI_BRIDGE_CALL(b, stop, 1, b);
|
||||
@@ -122,7 +125,6 @@ static void ui_bridge_stop(UI *b)
|
||||
uv_mutex_destroy(&bridge->mutex);
|
||||
uv_cond_destroy(&bridge->cond);
|
||||
xfree(bridge->ui); // Threads joined, now safe to free UI container. #7922
|
||||
ui_detach_impl(b);
|
||||
xfree(b);
|
||||
}
|
||||
static void ui_bridge_stop_event(void **argv)
|
||||
|
Reference in New Issue
Block a user