[PR #13516] [CLOSED] Make selection have an exclusive end #29597

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/13516
Author: @carlos-zamora
Created: 7/15/2022
Status: Closed

Base: mainHead: dev/cazamor/sln/exclusive-end


📝 Commits (2)

  • 760064d rendering + markers + KS + mouse
  • a284281 Migrate spelling-0.0.21 changes from main

📊 Changes

19 files changed (+1199 additions, -901 deletions)

View changed files

.github/actions/spelling/README.md (+15 -0)
📝 .github/actions/spelling/advice.md (+16 -18)
📝 .github/actions/spelling/allow/allow.txt (+10 -2)
📝 .github/actions/spelling/allow/apis.txt (+15 -3)
📝 .github/actions/spelling/allow/names.txt (+2 -0)
.github/actions/spelling/candidate.patterns (+523 -0)
📝 .github/actions/spelling/excludes.txt (+39 -6)
📝 .github/actions/spelling/expect/alphabet.txt (+0 -8)
📝 .github/actions/spelling/expect/expect.txt (+127 -755)
📝 .github/actions/spelling/expect/web.txt (+0 -23)
.github/actions/spelling/line_forbidden.patterns (+62 -0)
📝 .github/actions/spelling/patterns/patterns.txt (+73 -0)
📝 .github/actions/spelling/reject.txt (+9 -19)
📝 .github/workflows/spelling2.yml (+123 -9)
📝 src/buffer/out/textBuffer.cpp (+18 -4)
📝 src/cascadia/TerminalControl/ControlCore.cpp (+4 -3)
📝 src/cascadia/TerminalControl/TermControl.cpp (+1 -1)
📝 src/cascadia/TerminalCore/Terminal.hpp (+5 -4)
📝 src/cascadia/TerminalCore/TerminalSelection.cpp (+157 -46)

📄 Description

Summary of the Pull Request

Selection is generally stored as a range of start and end where start <= end. However, this prevents the ability to have a selection be an empty range denoting the space between two cells. To fix this, we need to make the end exclusive.

References

Epic: #4993
Closes #13447

Detailed Description of the Pull Request / Additional comments

TODO CARLOS: I'll write this at some point, I swear.

Validation Steps Performed

  • Rendering the selection

  • Copying the selection

  • Selection markers

  • Keyboard Selection

mode left right up down
char cursor:
start:
end:
cursor:
start:
end:
cursor:
start:
end:
cursor:
start:
end:
word cursor:
start:
end:
cursor:
start:
end:
cursor:
start:
end:
cursor:
start:
end:
view cursor:
start:
end:
cursor:
start:
end:
cursor:
start:
end:
cursor:
start:
end:
buffer cursor:
start:
end:
cursor:
start:
end:
cursor:
start:
end:
cursor:
start:
end:
  • Mouse selection
# of clicks no movement click + drag shift + click
1
2
3
  • Block selection

    • alt + drag mouse
    • keyboard selection
  • Corner cases:

    • wide glyphs
    • scrolling when keyboard selection goes to the top/bottom edge
    • click +drag to the left/right edge
    • keyboard selection when wrapping off the left/right edge

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/13516 **Author:** [@carlos-zamora](https://github.com/carlos-zamora) **Created:** 7/15/2022 **Status:** ❌ Closed **Base:** `main` ← **Head:** `dev/cazamor/sln/exclusive-end` --- ### 📝 Commits (2) - [`760064d`](https://github.com/microsoft/terminal/commit/760064d0fb71a29b3a0b2b3502366883051b87e2) rendering + markers + KS + mouse - [`a284281`](https://github.com/microsoft/terminal/commit/a284281d87a555664cedd4f91b57d7a36b40d11b) Migrate spelling-0.0.21 changes from main ### 📊 Changes **19 files changed** (+1199 additions, -901 deletions) <details> <summary>View changed files</summary> ➕ `.github/actions/spelling/README.md` (+15 -0) 📝 `.github/actions/spelling/advice.md` (+16 -18) 📝 `.github/actions/spelling/allow/allow.txt` (+10 -2) 📝 `.github/actions/spelling/allow/apis.txt` (+15 -3) 📝 `.github/actions/spelling/allow/names.txt` (+2 -0) ➕ `.github/actions/spelling/candidate.patterns` (+523 -0) 📝 `.github/actions/spelling/excludes.txt` (+39 -6) 📝 `.github/actions/spelling/expect/alphabet.txt` (+0 -8) 📝 `.github/actions/spelling/expect/expect.txt` (+127 -755) 📝 `.github/actions/spelling/expect/web.txt` (+0 -23) ➕ `.github/actions/spelling/line_forbidden.patterns` (+62 -0) 📝 `.github/actions/spelling/patterns/patterns.txt` (+73 -0) 📝 `.github/actions/spelling/reject.txt` (+9 -19) 📝 `.github/workflows/spelling2.yml` (+123 -9) 📝 `src/buffer/out/textBuffer.cpp` (+18 -4) 📝 `src/cascadia/TerminalControl/ControlCore.cpp` (+4 -3) 📝 `src/cascadia/TerminalControl/TermControl.cpp` (+1 -1) 📝 `src/cascadia/TerminalCore/Terminal.hpp` (+5 -4) 📝 `src/cascadia/TerminalCore/TerminalSelection.cpp` (+157 -46) </details> ### 📄 Description ## Summary of the Pull Request Selection is generally stored as a range of `start` and `end` where `start <= end`. However, this prevents the ability to have a selection be an empty range denoting the space between two cells. To fix this, we need to make the `end` exclusive. ## References Epic: #4993 Closes #13447 ## Detailed Description of the Pull Request / Additional comments TODO CARLOS: I'll write this at some point, I swear. ## Validation Steps Performed - [X] Rendering the selection - [X] Copying the selection - [X] Selection markers - Keyboard Selection | mode | left | right | up | down | |--|--|--|--|--| | char | cursor: ✅ <br/> start: ✅ <br/> end: ✅ | cursor: ✅ <br/> start: ✅ <br/> end: ✅ | cursor: ✅ <br/> start: ✅ <br/> end: ✅ | cursor: ✅ <br/> start: ✅ <br/> end: ✅ | | word | cursor: ✅ <br/> start: ✅ <br/> end: ✅ | cursor: ✅ <br/> start: ✅ <br/> end: ✅ | cursor: ✅ <br/> start: ✅ <br/> end: ✅ | cursor: ✅ <br/> start: ✅ <br/> end: ✅ | | view | cursor: ✅ <br/> start: ✅ <br/> end: ✅ | cursor: ✅ <br/> start: ✅ <br/> end: ✅ | cursor: ✅ <br/> start: ✅ <br/> end: ✅ | cursor: ✅ <br/> start: ✅ <br/> end: ✅ | | buffer | cursor: ✅ <br/> start: ✅ <br/> end: ✅ | cursor: ✅ <br/> start: ✅ <br/> end: ✅ | cursor: ✅ <br/> start: ✅ <br/> end: ✅ | cursor: ✅ <br/> start: ✅ <br/> end: ✅ | - Mouse selection | # of clicks | no movement | click + drag | shift + click | |--|--|--|--| | 1 | ✅ | ✅ | ✅ | | 2 | ✅ | ❓ | ✅ | | 3 | ✅ | ❓ | ✅ | - Block selection - [X] alt + drag mouse - [X] keyboard selection - Corner cases: - [ ] wide glyphs - [ ] scrolling when keyboard selection goes to the top/bottom edge - [ ] click +drag to the left/right edge - [X] keyboard selection when wrapping off the left/right edge --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:35:50 +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#29597