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

Implementation of modulo line numbers #333

Merged
merged 7 commits into from
Nov 27, 2021
Merged

Implementation of modulo line numbers #333

merged 7 commits into from
Nov 27, 2021

Conversation

AndreasArvidsson
Copy link
Member

@AndreasArvidsson AndreasArvidsson commented Nov 25, 2021

take row 15 => will select 15/115/215/...

return editor.selection.active.line + linePosition.lineNumber;
case "modulo100":
const stepSize = 100;
const { start, end } = editor.visibleRanges[0];
Copy link
Member

Choose a reason for hiding this comment

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

How do you plan to handle folding? That's how you get multiple visible ranges. Should probably report an error if two lines from different folded regions can match

Copy link
Member Author

Choose a reason for hiding this comment

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

Good call. I will just throw an error if I can find multiple matching lines.

Copy link
Member Author

Choose a reason for hiding this comment

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

@pokey It's updated and looks good imnsho :)

@AndreasArvidsson
Copy link
Member Author

@pokey So now we have proper support for folded regions

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. I ran the yaml normaliser in 4e1c57a to make future diffs cleaner. We should maybe bake this step into pre-commit / CI

@AndreasArvidsson AndreasArvidsson merged commit 514c72d into main Nov 27, 2021
@AndreasArvidsson AndreasArvidsson deleted the modulo_line branch November 27, 2021 13:29
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.

2 participants