From 390b40e02b13326bbf4f638516d4bfb181fd7894 Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Wed, 29 May 2024 12:55:37 +0200 Subject: [PATCH] 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 --- src/input_common.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/input_common.rs b/src/input_common.rs index af3d9bac1..a97cdbeb8 100644 --- a/src/input_common.rs +++ b/src/input_common.rs @@ -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()); } }