-
-
Notifications
You must be signed in to change notification settings - Fork 84
Bugfixes: past token, past end of, subtoken out of range, sort tokens #229
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
Conversation
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.
Ok nice fixes; left a few comments tho. Also would be good to add a test with same initial state as "take token past trap" (eg cursor in middle of first token), but say "take past trap" to make sure it doesn't expand to first token. Could see us messing that one up down the road if there's no test 😅
src/test/suite/fixtures/recorded/surroundingPair/takeFirstChar.yml
Outdated
Show resolved
Hide resolved
src/test/suite/fixtures/recorded/surroundingPair/takeFirstChar5.yml
Outdated
Show resolved
Hide resolved
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.
Pushed a couple changes but otherwise looks good to me!
@@ -64,9 +65,63 @@ export default class NavigationMap { | |||
this.map = {}; | |||
} | |||
|
|||
public getTokenForRange(range: Range) { | |||
return Object.values(this.map).find( | |||
public getTokenSelectionForSelection( |
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.
This code doesn't really fit in the navigation map. Earmarking to move it for cursorless engine 2.0 work, as it should become a proper scope type
fixes #221
fixes #222
fixes #201
fixes #209
fixes #200
fixes #198