Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extend :Gbrowse to support line anchors for commits
When current selected lines range is fully contained in a single diff hunk :Gbrowse will include 'diff' dictionary in metadata passed to upstream providers containing these fields: * 'start' and 'end': ' ', '-' or '+' when start/end of selection is on the context, removed or added line * 'oldpath': path of the '---' side of the diff hunk (empty for additions) * 'newpath': path of the '+++' side of the diff hunk (empty for removals) * 'oldstart' and 'oldend': line numbers for selected range in the '---' side * 'newstart' and 'newend': line numbers for selected range in the '+++' side For positions in added or removed lines, opposite side line number is taken as for the *next* context line (even if it doesn't exist). Exception is completely missing paths (additions or removals) - corresponding line number is always 0. This is the same numbering logic as in the diff hunk header.
- Loading branch information