aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-01-25 07:34:28 +0800
committerGitHub <noreply@github.com>2023-01-25 07:34:28 +0800
commit51b39f816ca4a44660e7ab7906520ae908492734 (patch)
tree95fa35fc146d7285f1b006b01e9321a45666fb08
parent314d3ce1eb1da284baf9b33f30500473afe73144 (diff)
downloadrneovim-51b39f816ca4a44660e7ab7906520ae908492734.tar.gz
rneovim-51b39f816ca4a44660e7ab7906520ae908492734.tar.bz2
rneovim-51b39f816ca4a44660e7ab7906520ae908492734.zip
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().
-rw-r--r--src/nvim/tui/tui.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/nvim/tui/tui.c b/src/nvim/tui/tui.c
index 3130cd27fe..a50e44f7a3 100644
--- a/src/nvim/tui/tui.c
+++ b/src/nvim/tui/tui.c
@@ -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);