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

Make linenumbers relative to file #71

Draft
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

SebDieBln
Copy link

This fixes #67.
Comments to lines of a file are now referenced to the actual line in the file, not the line in the diff-view. If the comment is for a deleted line, the line-number within the old file is used and saved along with a minus-sign as a flag to indicate it is for the old file.

There is room for further improvement:

  • Migrate of existing comments using default values for creating the diff-view.
  • Show an indicator if a comment is hidden, because the line it is on is outside the current diff-view.

@SebDieBln SebDieBln force-pushed the MakeLinenumbersRelativeToFile branch from 6b45460 to dcc4fb3 Compare January 13, 2018 13:58
@SebDieBln SebDieBln force-pushed the MakeLinenumbersRelativeToFile branch from 94605d5 to 85e8889 Compare March 4, 2018 19:41
@SebDieBln SebDieBln force-pushed the MakeLinenumbersRelativeToFile branch from 85e8889 to 11a1a9e Compare March 30, 2018 14:57
@rjollos rjollos self-assigned this May 11, 2018
@SebDieBln SebDieBln force-pushed the MakeLinenumbersRelativeToFile branch 2 times, most recently from 52045fb to 9b56c01 Compare September 22, 2019 17:45
@SebDieBln SebDieBln marked this pull request as draft August 27, 2023 11:10
@SebDieBln SebDieBln force-pushed the MakeLinenumbersRelativeToFile branch 2 times, most recently from 970ff60 to b945f04 Compare August 30, 2023 21:19
Remove the bogus line numbers and leave an explanation in the text of the comment.
The term "line number" is ambiguous because there is a difference between a line number "within the diff" and a line number "within a file".
Negative line numbers are used to indicate a comment that was placed on a line of the old file.
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.

Code comments don't work when changing the number of lines
2 participants