aboutsummaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorJJ Liebig <jonathan.liebig@gmail.com>2026-09-13 19:43:13 +0400
committerGitHub <noreply@github.com>2026-09-13 17:43:13 +0200
commitcb06df63312eee11006eead7153db061fd02820d (patch)
tree5425b9fb7bbfc281fe56d676415f2118bce368d0 /src/client
parentfc1cb77f0572948552377b23f7754a3016ac7dfa (diff)
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
Diffstat (limited to 'src/client')
-rw-r--r--src/client/mod.rs4
1 files changed, 4 insertions, 0 deletions
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();