Repository navigation
desktop: keep the shift+drag selection after release (0.3.1) - #9
Merged
Merged
Conversation
hqtui enables any-motion mouse tracking (DECSET 1003) for hover. xterm.js treats every mouse report as user input and clears the selection on it, so the first hover report after releasing a shift+drag wiped the highlight. Hold back button-less motion reports while text is selected. Also put the selection on the Linux PRIMARY selection (middle-click paste), and add a smoke-test step that shift+drags under 1003 and fails if the selection does not survive the mouse moving on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…de_modules too Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Bug: in hqterm desktop, shift+drag highlighted text, but the highlight disappeared as soon as the mouse button was released.
Cause: hqtui turns on any-motion mouse tracking (DECSET 1003) for hover. xterm.js treats every mouse report as user input (
triggerDataEvent(report, true)→onUserInput), andSelectionServiceclears the selection on user input. Shift+drag stops reports while the button is held. After release, though, the first hover motion sends a report, and that report clears the selection.Fix:
any, a capture-phase listener on the pane stops button-lessmousemoveevents, so xterm sends no hover report. Clicks, wheel and keys still clear the selection as before. Hover comes back once the selection is cleared.Could not run Electron locally (no display or Xvfb on the box). The Xvfb smoke test in CI covers it.
🤖 Generated with Claude Code