fix(tui): set stdin as "blocking" on exit (#21973)

This fixes a regression from #21605 that stdin is no longer set as
"blocking" after Nvim TUI exits, and the problems described in #2598
happen again.

I'm not sure if this should be done in TUI code or common exiting code.
I added this call in tui_stop() as it is also present in tui_suspend().
This commit is contained in:
zeertzjq 2023-01-25 07:34:28 +08:00 committed by GitHub
parent 314d3ce1eb
commit 51b39f816c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -459,6 +459,7 @@ static void tui_terminal_stop(TUIData *tui)
void tui_stop(TUIData *tui)
{
tui_terminal_stop(tui);
stream_set_blocking(tui->input.in_fd, true); // normalize stream (#2598)
tinput_destroy(&tui->input);
tui->stopped = true;
signal_watcher_close(&tui->winch_handle, NULL);