mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-23 06:05:39 +08:00
Unconditionally set the tty mode in reader_readline
There was a bogus check for is_interactive_session. But if we are in reader_readline we are necessarily interactive (even if we are not in an interactive session, i.e. a fish script invoked some interactive functionality). Remove this check. Fixes #5519
This commit is contained in:
parent
1680b741b2
commit
3cc581fbb0
|
@ -2491,11 +2491,9 @@ const wchar_t *reader_readline(int nchars) {
|
|||
// Get the current terminal modes. These will be restored when the function returns.
|
||||
if (tcgetattr(STDIN_FILENO, &old_modes) == -1 && errno == EIO) redirect_tty_output();
|
||||
// Set the new modes.
|
||||
if (is_interactive_session) {
|
||||
if (tcsetattr(0, TCSANOW, &shell_modes) == -1) {
|
||||
if (errno == EIO) redirect_tty_output();
|
||||
wperror(L"tcsetattr");
|
||||
}
|
||||
if (tcsetattr(0, TCSANOW, &shell_modes) == -1) {
|
||||
if (errno == EIO) redirect_tty_output();
|
||||
wperror(L"tcsetattr");
|
||||
}
|
||||
|
||||
while (!finished && !data->end_loop) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user