From cb06df63312eee11006eead7153db061fd02820d Mon Sep 17 00:00:00 2001 From: JJ Liebig Date: Sun, 13 Sep 2026 19:43:13 +0400 Subject: fix(windows): disable host mouse reporting on terminal restore (#4055) Windows skipped the xterm mouse-reporting reset because clear_host_mouse_reporting was a no-op there. Standalone Git Bash (mintty) keeps SGR mouse reporting enabled after detach, so mouse motion leaks escape sequences into the shell. Emit the reset sequence on Windows too and include the X10 mode. refs #3748 --- src/client/mod.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/client') diff --git a/src/client/mod.rs b/src/client/mod.rs index b815a057..af2e92c8 100644 --- a/src/client/mod.rs +++ b/src/client/mod.rs @@ -142,6 +142,10 @@ fn run_client_with_mode( init_logging(); let loaded_config = crate::config::Config::load(); + // Windows may not have virtual terminal processing enabled until the rendered + // client initializes the terminal, so defer the host mouse reset to + // `setup_terminal_with_capabilities` instead of emitting raw escapes early. + #[cfg(not(windows))] crate::terminal_modes::clear_host_mouse_reporting(&mut io::stdout())?; let client_rendered_shell = attach_request.is_none(); let socket_path = client_socket_path(); -- cgit v1.2.3