-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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 an exclusive range #18106
Open
carlos-zamora
wants to merge
34
commits into
main
Choose a base branch
from
dev/cazamor/sln/exclusive-end
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
aa95790
[AtlasEngine] Render selection as exclusive range
carlos-zamora 4697f49
Fix any side-effects of making GetText exclusive
carlos-zamora 4364643
Update selection markers appropriately
carlos-zamora 014f338
[Mark Mode] Move by character (includes wide-glyph handling)
carlos-zamora ba673a4
[Mark Mode] Move by viewport
carlos-zamora cd2da0e
[Mark Mode] Move by buffer
carlos-zamora ff45eb9
[Mark Mode] Move by word
carlos-zamora 659cd02
[Mark Mode] Handle move up/down onto middle of emoji
carlos-zamora e7ca807
Bugfix: renderer highlights lines when at x-boundary
carlos-zamora 7ff4838
Bugfix: move to next word would move past mutable bottom
carlos-zamora 928e9a9
Fix some more rendering issues
carlos-zamora 9d361d2
Fix more rendering issues w/ Leonard
carlos-zamora 845e43d
Fix highlighting in AtlasEngine
lhecker 8b996a9
fix session restore
carlos-zamora df89ad0
Ensure mouse selection scenarios work right
carlos-zamora 9e9db42
Fix UIA
carlos-zamora eea8399
Fix hyperlinks
carlos-zamora 7bfd647
fix tests
carlos-zamora 52f3bc0
fix other tests
carlos-zamora 408d149
spell
carlos-zamora 57b82cb
[UIA] allow end exclusive
carlos-zamora e98033e
audit
carlos-zamora e621c1c
fix some more tests
carlos-zamora 83d2bff
apply feedback
carlos-zamora 6aed5f9
Fix shift+tab to select hyperlink
carlos-zamora 7a8d448
Fix ConHost
carlos-zamora 6b99816
Fix 'off by 1' hyperlink detection
carlos-zamora d179e9c
bugfix: don't select trailing whitespace with mouse word selection
carlos-zamora d2ed09e
bugfix: click+drag on cell should select the cell we're on
carlos-zamora 37ad74f
bugfix: double-click + drag would prematurely expand
carlos-zamora dbfdf81
fix tests; fix conhost block selection
carlos-zamora bee9371
fix terminal core selection tests
carlos-zamora 44a1e42
fix tests and add more comments to preserve sanity
carlos-zamora 4764653
simplify and add comment
carlos-zamora File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not 100% sure if I understand this code, but to me it feels like the calling code should contain the fix for this and not this function. Is this perhaps just a case of
floor
VS.ceil
in the calling code?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I'm not happy about this part either. Let me explain what's going on better. The code flow is:
ControlInteractivity::SetEndSelectionPoint()
(link) - called on mouse dragControlInteractivity::_getTerminalPosition()
(link): round to the nearest cell, that way, we have to drag past a cell to "select" itControlCore::SetEndSelectionPoint()
(link): really just clamps the position to the viewport boundsTerminal::SetSelectionEnd()
(link) -->Terminal::_SetSelectionEnd()
(link):Terminal::_ExpandSelectionAnchors()
(link): this is where we actually expand our selection endpoints if we're multi-clicking.Thankfully,
_ExpandSelectionAnchors()
is only used in this spot. I'm not sure where else the change would make sense to go though. Open to suggestions.