commit c3d8665851c20414007f04a481c5a542d9d139f2
parent 4dd793a256fefb481159f9f93bf7572391e266de
Author: zeertzjq <zeertzjq@outlook.com>
Date: Tue, 3 Jan 2023 17:21:42 +0800
fix(exit): the TUI should not ui_flush() itself (#21625)
Diffstat:
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/nvim/main.c b/src/nvim/main.c
@@ -627,7 +627,9 @@ void os_exit(int r)
{
exiting = true;
- ui_flush();
+ if (!ui_client_channel_id) {
+ ui_flush();
+ }
ui_call_stop();
ml_close_all(true); // remove all memfiles
diff --git a/src/nvim/ui.c b/src/nvim/ui.c
@@ -506,6 +506,7 @@ handle_T ui_cursor_grid(void)
void ui_flush(void)
{
+ assert(!ui_client_channel_id);
if (!ui_active()) {
return;
}