Use correct line when using :parent
in blame view
#1372
Merged
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.
@krobelus observed in #1370 that this behavior, fixed in ca0809d, regressed again in 2280734.
This bug is similar to, but not identical with, #1369.
The easiest way to observe the bug is to run
tig blame +28 tig-2.5.12 -- src/diff.c
and press,
AKA:parent
. The problem is that the view stays on line 28 instead of jumping to the corresponding line.This PR is complementary with #1370, they fix different bugs and can be merged independently. We could also decide on a different solution of changing the meaning of
blame->line
. That would also require a change to #1370.See #1370 (comment) and the following comment for more details
A lot of this work is based heavily on that of @krobelus; the test is almost an exact copy of the test from #1370 for example.