Skip to content

Commit

Permalink
fix(exit): the TUI should not ui_flush() itself (#21625)
Browse files Browse the repository at this point in the history
  • Loading branch information
zeertzjq committed Jan 3, 2023
1 parent 4dd793a commit c3d8665
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/nvim/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions src/nvim/ui.c
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,7 @@ handle_T ui_cursor_grid(void)

void ui_flush(void)
{
assert(!ui_client_channel_id);
if (!ui_active()) {
return;
}
Expand Down

0 comments on commit c3d8665

Please sign in to comment.