Skip to content

Implementation of modulo line numbers#333

Merged
AndreasArvidsson merged 7 commits intomainfrom
modulo_line
Nov 27, 2021
Merged

Implementation of modulo line numbers#333
AndreasArvidsson merged 7 commits intomainfrom
modulo_line

Conversation

@AndreasArvidsson
Copy link
Copy Markdown
Member

@AndreasArvidsson AndreasArvidsson commented Nov 25, 2021

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

Comment thread src/processTargets/processMark.ts Outdated
return editor.selection.active.line + linePosition.lineNumber;
case "modulo100":
const stepSize = 100;
const { start, end } = editor.visibleRanges[0];
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member Author

@pokey So now we have proper support for folded regions

Copy link
Copy Markdown
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