From 7265a2b101c9541a4ee5c800485b074774be26a7 Mon Sep 17 00:00:00 2001 From: akbash Date: Thu, 10 Sep 2026 14:02:33 +0300 Subject: fix(windows): preserve legacy mouse reports over ssh (#3742) * fix(windows): preserve legacy mouse reports over ssh refs #3735 * fix(windows): preserve input after missing mouse release refs #3735 --------- Co-authored-by: akbash-bot <300245827+akbash-bot@users.noreply.github.com> Co-authored-by: JJ Liebig --- src/raw_input.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/raw_input.rs') diff --git a/src/raw_input.rs b/src/raw_input.rs index 3f2e102e..0192366d 100644 --- a/src/raw_input.rs +++ b/src/raw_input.rs @@ -98,6 +98,11 @@ impl RawInputFramer { self.byte_framer.has_pending_bracketed_paste() } + #[cfg(any(windows, test))] + pub(crate) fn has_pending_default_mouse_sequence(&self) -> bool { + starts_with_incomplete_default_mouse_sequence(&self.byte_framer.buffer) + } + pub(crate) fn flush_timeout(&mut self) -> Vec { Self::events_from_chunks(self.byte_framer.flush_timeout()) } @@ -812,7 +817,7 @@ fn starts_with_incomplete_sgr_mouse_sequence(buffer: &[u8]) -> bool { .all(|byte| byte.is_ascii_digit() || *byte == b';') } -#[cfg(any(unix, test))] +#[cfg(any(unix, windows, test))] fn starts_with_incomplete_default_mouse_sequence(buffer: &[u8]) -> bool { buffer.starts_with(b"\x1b[M") && buffer.len() < 6 } -- cgit v1.2.3