From 70242ce38cdc7244bcb9074ea663689579cf6e6a Mon Sep 17 00:00:00 2001 From: Fabian Boehm Date: Wed, 3 Jul 2024 20:26:30 +0200 Subject: [PATCH] reader: Fix external modes again Missed in the port --- src/reader.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/reader.rs b/src/reader.rs index 1fee788fa..e2d3a26bd 100644 --- a/src/reader.rs +++ b/src/reader.rs @@ -3647,6 +3647,10 @@ pub fn term_copy_modes() { unsafe { libc::tcgetattr(STDIN_FILENO, &mut modes) }; let mut tty_modes_for_external_cmds = TTY_MODES_FOR_EXTERNAL_CMDS.lock().unwrap(); *tty_modes_for_external_cmds = modes; + // We still want to fix most egregious breakage. + // E.g. OPOST is *not* something that should be set globally, + // and 99% triggered by a crashed program. + term_fix_external_modes(&mut tty_modes_for_external_cmds); // Copy flow control settings to shell modes. if (tty_modes_for_external_cmds.c_iflag & IXON) != 0 {