mirror of
https://github.com/neovim/neovim.git
synced 2024-09-17 20:58:20 -04:00
fix(tui): properly check if stdin is a tty (#22321)
After #21831 `in_fd` is no longer set to stderr when starting TUI, so check for `stdin_isatty` instead. Fix #22259.
This commit is contained in:
parent
c726585ce1
commit
4028731900
@ -1147,7 +1147,7 @@ void tui_mode_change(TUIData *tui, String mode, Integer mode_idx)
|
||||
// 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 (tui->is_starting && tui->input.in_fd == STDERR_FILENO) {
|
||||
if (tui->is_starting && !stdin_isatty) {
|
||||
int ret = uv_tty_set_mode(&tui->output_handle.tty, UV_TTY_MODE_NORMAL);
|
||||
if (ret) {
|
||||
ELOG("uv_tty_set_mode failed: %s", uv_strerror(ret));
|
||||
|
Loading…
Reference in New Issue
Block a user