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

Make selection have an exclusive end #13516

Closed
wants to merge 2 commits into from

Conversation

carlos-zamora
Copy link
Member

@carlos-zamora carlos-zamora commented Jul 15, 2022

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
Copy link
Member Author

carlos-zamora commented Jul 15, 2022

Why is this in draft?

@zadjii-msft
Copy link
Member

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

@carlos-zamora
Copy link
Member 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

@zadjii-msft zadjii-msft added this to the Terminal v1.17 milestone Aug 25, 2022
@zadjii-msft zadjii-msft removed this from the Terminal v1.17 milestone Jul 5, 2023
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