This repository was archived by the owner on Oct 13, 2021. It is now read-only.
Fix bug 1007293, blame link scrolls to selected line.#448
Closed
pelmers wants to merge 4 commits into
Closed
Conversation
Contributor
There was a problem hiding this comment.
It's not your fault; it's mine for getting behind in reviews. But regions and refs now use actual classes for their return values, so let's take the opportunity to do so for links as well. Then, the next time we add something, we won't need to touch every line that deals with the data structure. :-)
Add an extra field to the FileToSkim.links() return tuple to indicate
whether to update to the selected line. Allow the code highlighter to
handle #l{number} in addition to #{number} so that we can re-use the
same code for links to Github, hg web, and permalinks.
Instead of True/False, links can return an anchor template string, where
{{start}} and {{end}} are replaced at highlight time by the selected
highlight range, if only one range is highlighted.
Contributor
Author
|
On a double check, I don't think that hg web supports region highlight at all. It seems to only have jump to line. I will change the template correspondingly. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add an extra field to the FileToSkim.links() return tuple to indicate
whether to update to the selected line. Allow the code highlighter to
handle #l{number} in addition to #{number} so that we can re-use the
same code for links to Github, hg web, and permalinks.