Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix: only round to the nearest cell for selection #18486

Merged
merged 2 commits into from
Jan 31, 2025

Conversation

carlos-zamora
Copy link
Member

Summary of the Pull Request

Fixes a bug where VT mouse mode would round to the nearest cell when clicking the mouse button.
The fix is to round to the nearest cell only when we're selecting text. The other scenarios affected are:

  • clicking on a hyperlink
  • vt mouse mode
  • where the context menu is anchored

Really the most notable ones were the first two. So now, we use the position of the cell we clicked on. We only round for selection.

References and Relevant Issues

Follow-up to #18106

Detailed Description of the Pull Request / Additional comments

Validation Steps Performed

Opened Midnight Commander in Ubuntu and clicked between the two panes.

  • Before: threshold was too early to switch between panes
  • After: threshold is clearly separated between the outline of the two panes

Copy link
Member

@DHowett DHowett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do away with the GH# references - in a way, it's like saying "this is related to the selection changes". Well, every change here is related to selection ;)

src/cascadia/TerminalControl/ControlInteractivity.cpp Outdated Show resolved Hide resolved
src/cascadia/TerminalControl/ControlInteractivity.cpp Outdated Show resolved Hide resolved
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Jan 31, 2025
Co-authored-by: Dustin L. Howett <[email protected]>
@microsoft-github-policy-service microsoft-github-policy-service bot removed the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Jan 31, 2025
@carlos-zamora carlos-zamora enabled auto-merge (squash) January 31, 2025 22:08
@carlos-zamora carlos-zamora merged commit 425d6b0 into main Jan 31, 2025
17 of 19 checks passed
@carlos-zamora carlos-zamora deleted the dev/cazamor/bugfix-selection-rounding branch January 31, 2025 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants