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

Add line range(s) highlight support #170

Merged

Conversation

ryantam626
Copy link
Contributor

Sometimes user wants to highlight a range instead of just one line, this PR adds support for doing that.

This PR also adds support for highlighting ranges for many files at once.

GitHub itself also only support highlighting one range per file, so we won't bother implementing many ranges per file just yet unless there is a demand for it. (Also our line range extension algo is slightly different to that in GitHub, oh wells.)

The states required for this functionality demands more complexity as such we have added more internal states for tracking it, and actively sync it with the ground truth (the newest window location hash) when it changes.

Sometimes user wants to highlight a range instead of just one line, this
commit adds support for doing that.

This commit also adds support for highlighting ranges for many files at
once.

GitHub itself also only support highlighting one range per file, so we
won't bother implementing many ranges per file just yet unless there is
a demand for it. (Also our line range extension algo is slightly
different to that in GitHub, oh wells.)

The states required for this functionality demands more complexity as
such we have added more internal states for tracking it, and actively
sync it with the ground truth (the newest window location hash) when it changes.
@supakeen
Copy link
Owner

Very nice; tried it out and it works well. If you want can you add a line to the changelog for the 1.5.0 release? This is major enough to add it there. I can also add it myself.

@ryantam626
Copy link
Contributor Author

Done 🙌

@supakeen supakeen merged commit 49a27d8 into supakeen:master Jul 14, 2023
7 checks passed
@supakeen
Copy link
Owner

Thank you.

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.

None yet

2 participants