[PR #18885] FIX#18877 Triple-click to select logical line #31634

Open
opened 2026-01-31 09:48:32 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/18885

State: closed
Merged: Yes


Summary of the Pull Request

This fixes #18877, This iteratively checks to see if a line is wrapped and moves up or down accordingly.

Detailed Description of the Pull Request / Additional comments

Current behavior: When a user triple-clicks on a line that’s visually wrapped by the terminal, only the single physical row that was clicked gets selected.

Expected behavior: A triple-click like in xterm, should select the entire logical line including all of its wrapped segments, from the true start through its true end, regardless of where the wrap occurred.

Why it matters: Logical line selection is what users expect when they’re trying to grab one command or output block in full. Limiting the selection to just the current physical row can lead to copy/paste mistakes and a confusing experience whenever a long line wraps.

Validation Steps Performed

I ran the existing tests using Invoke-OpenConsoleTests and they were passing and I was also able to test the build on my machine. I added a test case as well

PR Checklist

**Original Pull Request:** https://github.com/microsoft/terminal/pull/18885 **State:** closed **Merged:** Yes --- ## Summary of the Pull Request This fixes #18877, This iteratively checks to see if a line is wrapped and moves up or down accordingly. ## Detailed Description of the Pull Request / Additional comments **Current behavior:** When a user triple-clicks on a line that’s visually wrapped by the terminal, only the single physical row that was clicked gets selected. **Expected behavior:** A triple-click like in xterm, should select the entire logical line including all of its wrapped segments, from the true start through its true end, regardless of where the wrap occurred. **Why it matters:** Logical line selection is what users expect when they’re trying to grab one command or output block in full. Limiting the selection to just the current physical row can lead to copy/paste mistakes and a confusing experience whenever a long line wraps. ## Validation Steps Performed I ran the existing tests using `Invoke-OpenConsoleTests` and they were passing and I was also able to test the build on my machine. I added a test case as well ## PR Checklist - [x] Closes #18877 - [x] Tests added/passed
claunia added the pull-request label 2026-01-31 09:48:32 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#31634