Skip to content

Make selection have an exclusive end - #13516

Closed
Carlos Zamora (carlos-zamora) wants to merge 2 commits into
mainfrom
dev/cazamor/sln/exclusive-end
Closed

Carlos Zamora (carlos-zamora) wants to merge 2 commits into
mainfrom
dev/cazamor/sln/exclusive-end

Conversation

@carlos-zamora

@carlos-zamora Carlos Zamora (carlos-zamora) commented Jul 15, 2022 •

Copy link
Copy Markdown

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

@ghost ghost added Area-Accessibility Issues related to accessibility Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Terminal The new Windows Terminal. labels Jul 15, 2022
@carlos-zamora

Carlos Zamora (carlos-zamora) commented Jul 15, 2022 •

Copy link
Copy Markdown
Author

Why is this in draft?

@zadjii-msft

Copy link
Copy Markdown
Member

Is this something we're targeting for 1.16 or 1.17?

@carlos-zamora

Copy link
Copy Markdown
Author

Is this something we're targeting for 1.16 or 1.17?

We're gonna push this back to 1.17. Needs a lot of work, testing, and review.

That said, y'all should review it when you get the chance haha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-Accessibility Issues related to accessibility Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Terminal The new Windows Terminal.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A11y: windows terminal emits selection/deselection events in mark mode when navigating with arrow keys

3 participants