[PR #16441] Wrap word-wise selection when the word is actually wrapped #30919

Closed
opened 2026-01-31 09:43:49 +00:00 by claunia · 0 comments
Owner

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

State: closed
Merged: Yes


Summary of the Pull Request

Added wrapping to highlighted selection when selecting a word, added tests for it

References and Relevant Issues

#4009

Detailed Description of the Pull Request / Additional comments

  • Modified GetWordStart and GetWordEnd and their helpers to no longer be bounded by the right and left viewport ranges
  • Kept same functionality (does not wrap) when selecting wrapped whitespace
  • Added tests to TextBufferTests.cpp to include cases of wrapping text

Just a thought, we currently select the "Line" on triple-click, but would it make more sense to include the wrapping functionality to this as well?

Validation Steps Performed

  • Ran locally and verified selection works properly
  • Tests passed locally

PR Checklist

Sorry about closing the last PR, tried cleaning up the commits when I was merging and accidentally closed it 🤦‍♂️

**Original Pull Request:** https://github.com/microsoft/terminal/pull/16441 **State:** closed **Merged:** Yes --- ## Summary of the Pull Request Added wrapping to highlighted selection when selecting a word, added tests for it ## References and Relevant Issues #4009 ## Detailed Description of the Pull Request / Additional comments - Modified GetWordStart and GetWordEnd and their helpers to no longer be bounded by the right and left viewport ranges - Kept same functionality (does not wrap) when selecting wrapped whitespace - Added tests to TextBufferTests.cpp to include cases of wrapping text Just a thought, we currently select the "Line" on triple-click, but would it make more sense to include the wrapping functionality to this as well? ## Validation Steps Performed - Ran locally and verified selection works properly - Tests passed locally ## PR Checklist - [x] Closes #4009 - [x] Tests added/passed - [ ] Documentation updated - If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx - [ ] Schema updated (if necessary) Sorry about closing the last PR, tried cleaning up the commits when I was merging and accidentally closed it 🤦‍♂️
claunia added the pull-request label 2026-01-31 09:43:49 +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#30919