Repository navigation
fix(tui): preserve fragmented terminal mouse reports - #457
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On macOS terminal sessions, rapid two-finger trackpad scrolling can leak SGR mouse-report tails such as
[<65;100;24Minto the composer. The previous TUI wheel batching change (#456) cannot fix this parser-level failure.Root cause
BSH currently resolves Crossterm 0.29.0 from crates.io through Ratatui. On Unix, a short terminal read can end immediately after the ESC byte of an SGR mouse sequence. The old reader treated that short read as the end of available input, emitted ESC as a standalone key, and subsequently exposed the remainder of the mouse report as text.
This matches the observed symptom and is independently reproduced in the Crossterm regression report/fix. The pinned revision below changes both Unix readers to retain the ambiguous ESC briefly and adds split-report and ESC-followed-by-mouse regression tests.
Change
37ca4a27a9424ec5dbe6451f48c339d7b45f8d63through workspace[patch.crates-io].Cargo.lockto the exact git revision.Validation
Acceptance