Bug 439256

Summary: Comments are treated as whitespace even when not selected in preferences
Product: [Applications] kdiff3 Reporter: Tilman Vogel <tilman.vogel>
Component: applicationAssignee: michael <reeves.87>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: 1.9.2   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 1.9.3
Sentry Crash Report:
Attachments: example data A.txt
example data B.txt
Screenshot showing actual behaviour
Screenshot showing the preference that should control the behaviour.

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.