From 51b39f816ca4a44660e7ab7906520ae908492734 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 25 Jan 2023 07:34:28 +0800 Subject: 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(). --- src/nvim/tui/tui.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') 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); -- cgit