-
-
Notifications
You must be signed in to change notification settings - Fork 92
Utilize interior in relative scope modifier #3122
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
base: main
Are you sure you want to change the base?
Conversation
|
@pokey Mind having a look at this? |
pokey
left a comment
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.
Hard to say whether this will be nice or annoying in practice. I think worth shipping to find out
packages/cursorless-engine/src/processTargets/modifiers/RelativeScopeStage.ts
Outdated
Show resolved
Hide resolved
packages/cursorless-engine/src/processTargets/modifiers/RelativeScopeStage.ts
Outdated
Show resolved
Hide resolved
packages/cursorless-engine/src/processTargets/modifiers/RelativeScopeStage.ts
Outdated
Show resolved
Hide resolved
|
@pokey Please have another look now. |
|
Ok I made some tweaks. I expanded the comment with an example, and then tweaked the range exclusion: I think we should exclude the target ranges rather than the domain. Wdyt? |
|
I like your changes. The only thing still on my mind is if we really want to use itertools. At most ifilter can remove a single scope. I think for readability reasons we should probably just go back to normal array operations. edit: The more I think about it the more I think using itertools is just a premature optimization. I'm leaning towards readability here. |
By utilizing interior scope in relative scope modifier we can skip the interior of scopes. See new test.