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

Leading/trailing infers token on empty range #836

Merged
merged 7 commits into from
Jul 12, 2022
Merged

Conversation

AndreasArvidsson
Copy link
Member

"chuck trailing" with empty selection now works

Fixes #835

Checklist

@AndreasArvidsson AndreasArvidsson marked this pull request as ready for review July 5, 2022 23:56
@pokey
Copy link
Member

pokey commented Jul 6, 2022

You seem to have pulled in my whole cheatsheet PR here 😅

@AndreasArvidsson
Copy link
Member Author

AndreasArvidsson commented Jul 6, 2022

Whoops. Fixed now.

@@ -4,17 +4,21 @@ import { ProcessedTargetsContext } from "../../typings/Types";
import { isReversed } from "../../util/selectionUtils";
import { MarkStage } from "../PipelineStages.types";
import WeakTarget from "../targets/WeakTarget";
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried replacing these lines with import { TokenTarget, WeakTarget } from "../targets"; but that gives me the following error on extension activation: Activating extension 'pokey.cursorless' failed: Class extends value undefined is not a constructor or null.. I tried replacing all references to targets to go through the target/index file but no go.

Copy link
Member

@pokey pokey Jul 12, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh. I can take a look in a follow-up. I wonder if we need to do the same trick for our stages

Copy link
Member

@pokey pokey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with one question

src/processTargets/targets/WeakTarget.ts Outdated Show resolved Hide resolved
@AndreasArvidsson
Copy link
Member Author

AndreasArvidsson commented Jul 12, 2022

@pokey Do you know what the failed checks are about?

Copy link
Member

@pokey pokey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

leading/trailing should infer token on empty range
2 participants