mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-31 09:01:25 +08:00
Don't overwrite IXON/IXOFF for startup modes
We actually restore those before exit, so this would force-disable flow control whenever fish exits.
This commit is contained in:
parent
1426d61bc9
commit
c83436d050
@ -1319,10 +1319,6 @@ void reader_init() {
|
||||
// Save the initial terminal mode.
|
||||
tcgetattr(STDIN_FILENO, &terminal_mode_on_startup);
|
||||
|
||||
// Disable flow control by default.
|
||||
terminal_mode_on_startup.c_iflag &= ~IXON;
|
||||
terminal_mode_on_startup.c_iflag &= ~IXOFF;
|
||||
|
||||
// Set the mode used for program execution, initialized to the current mode.
|
||||
std::memcpy(&tty_modes_for_external_cmds, &terminal_mode_on_startup,
|
||||
sizeof tty_modes_for_external_cmds);
|
||||
@ -1331,6 +1327,12 @@ void reader_init() {
|
||||
// Set the mode used for the terminal, initialized to the current mode.
|
||||
std::memcpy(&shell_modes, &terminal_mode_on_startup, sizeof shell_modes);
|
||||
|
||||
// Disable flow control by default.
|
||||
tty_modes_for_external_cmds.c_iflag &= ~IXON;
|
||||
tty_modes_for_external_cmds.c_iflag &= ~IXOFF;
|
||||
shell_modes.c_iflag &= ~IXON;
|
||||
shell_modes.c_iflag &= ~IXOFF;
|
||||
|
||||
term_fix_modes(&shell_modes);
|
||||
|
||||
// We do this not because we actually need the window size but for its side-effect of correctly
|
||||
|
Loading…
x
Reference in New Issue
Block a user