mirror of
https://github.com/neovim/neovim.git
synced 2026-04-21 14:55:33 +00:00
@@ -1102,6 +1102,15 @@ static void tui_set_mode(UI *ui, ModeShape mode)
|
||||
static void tui_mode_change(UI *ui, String mode, Integer mode_idx)
|
||||
{
|
||||
TUIData *data = ui->data;
|
||||
#ifdef UNIX
|
||||
// If stdin is not a TTY, the LHS of pipe may change the state of the TTY
|
||||
// after calling uv_tty_set_mode. So, set the mode of the TTY again here.
|
||||
// #13073
|
||||
if (data->is_starting && data->input.in_fd == STDERR_FILENO) {
|
||||
uv_tty_set_mode(&data->output_handle.tty, UV_TTY_MODE_NORMAL);
|
||||
uv_tty_set_mode(&data->output_handle.tty, UV_TTY_MODE_IO);
|
||||
}
|
||||
#endif
|
||||
tui_set_mode(ui, (ModeShape)mode_idx);
|
||||
data->is_starting = false; // mode entered, no longer starting
|
||||
data->showing_mode = (ModeShape)mode_idx;
|
||||
|
||||
Reference in New Issue
Block a user