Bug 439256 - Comments are treated as whitespace even when not selected in preferences
Summary: Comments are treated as whitespace even when not selected in preferences
Status: RESOLVED FIXED
Alias: None
Product: kdiff3
Classification: Applications
Component: application (other bugs)
Version First Reported In: 1.9.2
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: michael
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-28 10:56 UTC by Tilman Vogel
Modified: 2021-10-25 20:38 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In: 1.9.3
Sentry Crash Report:


Attachments
example data A.txt (160 bytes, text/plain)
2021-06-28 10:56 UTC, Tilman Vogel
Details
example data B.txt (172 bytes, text/plain)
2021-06-28 10:57 UTC, Tilman Vogel
Details
Screenshot showing actual behaviour (76.70 KB, image/png)
2021-06-28 10:58 UTC, Tilman Vogel
Details
Screenshot showing the preference that should control the behaviour. (50.34 KB, image/png)
2021-06-28 10:59 UTC, Tilman Vogel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tilman Vogel 2021-06-28 10:56:28 UTC
In 1.9.2 and later, changes in C-style comments are treated as "only whitespace" differences even when the corresponding setting in the preferences is not active.

STEPS TO REPRODUCE
1. Make sure the "Ignore C/C++ comments (treat as white space)" option is off under Configure->Diff
2. Run a merge with the attached files: 
   LANG=C kdiff3 -m {A,B}.txt
3. Take a look at how the difference in the comment-only line is treated.

OBSERVED RESULT
The change in the comment is marked as "Merge Conflict (Whitespace only)".

EXPECTED RESULT
The change in the comment is marked as "Merge Conflict".


SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20210524
KDE Plasma Version: 5.21.5
KDE Frameworks Version: 5.82.0
Qt Version: 5.15.2
Kernel Version: 5.12.4-1-default
OS Type: 64-bit
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-7700HQ CPU @ 2.80GHz
Memory: 15.5 GiB of RAM
Graphics Processor: Mesa DRI Intel® HD Graphics 630

ADDITIONAL INFORMATION
Comment 1 Tilman Vogel 2021-06-28 10:56:50 UTC
Created attachment 139714 [details]
example data A.txt
Comment 2 Tilman Vogel 2021-06-28 10:57:10 UTC
Created attachment 139715 [details]
example data B.txt
Comment 3 Tilman Vogel 2021-06-28 10:58:04 UTC
Created attachment 139716 [details]
Screenshot showing actual behaviour
Comment 4 Tilman Vogel 2021-06-28 10:59:55 UTC
Created attachment 139717 [details]
Screenshot showing the preference that should control the behaviour.
Comment 5 michael 2021-07-08 20:39:16 UTC
A known limitation kdiff3 original definition of white-space only. The changes needed to fix this have been in master for testing. If no further regressions are found I can back this to 1.9.
Comment 6 michael 2021-08-18 19:27:21 UTC
See if 1.9.3 fixes this the needed changes were back-ported for this release.
Comment 7 michael 2021-10-25 20:38:46 UTC
Please let me know if this persists with 1.9.3 or later. As stated the changes made should address this issue.