Fix regression not refreshing TTY timestamps after external command from binding

Commit 8a7c3ce (Don't abandon line after writing control sequences, 2024-04-06)
was broken by 29f2da8 (Toggle terminal protocols lazily, 2024-05-16), fix that.

Fixes #10529
This commit is contained in:
Johannes Altmanninger 2024-05-29 12:55:37 +02:00
parent 8c364dc949
commit 390b40e02b

View file

@ -439,7 +439,6 @@ pub(crate) fn terminal_protocols_enable_ifn() {
return;
}
*term_protocols = Some(TerminalProtocols::new());
reader_current_data().map(|data| data.save_screen_state());
}
pub(crate) fn terminal_protocols_disable_ifn() {
@ -473,6 +472,7 @@ impl TerminalProtocols {
if IS_TMUX.load() {
let _ = write_to_fd("\x1b[?1004h".as_bytes(), STDOUT_FILENO);
}
reader_current_data().map(|data| data.save_screen_state());
Self {}
}
}
@ -496,6 +496,7 @@ impl Drop for TerminalProtocols {
if IS_TMUX.load() {
let _ = write_to_fd("\x1b[?1004l".as_bytes(), STDOUT_FILENO);
}
reader_current_data().map(|data| data.save_screen_state());
}
}