diff options
| author | akbash <akbash@herdr.dev> | 2026-09-10 14:02:33 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-09-10 14:02:33 +0300 |
| commit | 7265a2b101c9541a4ee5c800485b074774be26a7 (patch) | |
| tree | 0b8da341a84d37e5fa8543e4f1206efc6bdd88c7 /src/raw_input.rs | |
| parent | a52060315e1c2b694ffa147f869cd856306c46e0 (diff) | |
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 <jonathan.liebig@gmail.com>
Diffstat (limited to 'src/raw_input.rs')
| -rw-r--r-- | src/raw_input.rs | 7 |
1 files changed, 6 insertions, 1 deletions
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<RawInputEvent> { 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 } |
