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

"Ignore comment differences" still compares inline comments #2008

Closed
JustinReinhart opened this issue Sep 1, 2023 · 3 comments
Closed

"Ignore comment differences" still compares inline comments #2008

JustinReinhart opened this issue Sep 1, 2023 · 3 comments

Comments

@JustinReinhart
Copy link

JustinReinhart commented Sep 1, 2023

Issue:
Inline comments (end of line comments) should be ignored when user enables "Ignore comment differences". Currently WinMerge still marks these lines as different when the actual code is the same.

Example:
if ((WindowWidth >= Buffer->Width * 2) && // If display can support a 2x scale full screen

^ Here the comment "If display can support a 2x scale full screen" line is highlighted in orange and red, even though user has chosen to ignore comment differences.

What should happen:
WinMerge should not include the comment for comparison per user preference. The line should not trigger orange and red highlighting because the code to the left of the comment is the same in both files.

Use case:
User is taking a course with new source code released every day. User wants to keep their own comments but still diff/compare/merge daily course installments one line at a time.

@sdottaka
Copy link
Member

sdottaka commented Sep 2, 2023

Perhaps there is also a difference one line above or one line below the line shown in the example?
If so, unfortunately if there is another difference within the block of diff where the comment you want to ignore exists, the difference in that block will not be ignored. This is something I think needs improvement.
If not, I can't reproduce this problem, so
Could you please post a screenshot?

@JustinReinhart
Copy link
Author

JustinReinhart commented Sep 2, 2023

Screenshot attached as requested. Note: If I move the comment to its own line, the compare resolves and the comment becomes a gentle cream color as desired. Issue persists if I put the comment back at the end of the line. Issue also persists even if I clean up the extra blank line above it.

2023-09-01 Bug inline comment highlighting

2023-09-01 WinMerge Options

@sdottaka
Copy link
Member

sdottaka commented Sep 3, 2023

Thank you for providing the screenshot. I have been able to reproduce this issue (I couldn't reproduce it before because I hadn't tried it without inline comments in the other file). I have fixed it in commit 7a0b9a9, so I will now close this issue.

@sdottaka sdottaka closed this as completed Sep 3, 2023
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

No branches or pull requests

2 participants