Bug 437910

Summary: Manual diff alignment does not work anymore (regression in comparison to 1.8.4)
Product: [Applications] kdiff3 Reporter: Tilman Vogel <tilman.vogel>
Component: applicationAssignee: michael <reeves.87>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 1.9.2   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In: 1.9.3
Attachments: example data
A.txt
B.txt
C.txt
Screenshot from 1.8.4 (correct behaviour)
Screenshot from 1.9.2 (incorrect behaviour)

Description Tilman Vogel 2021-05-31 13:58:57 UTC
Created attachment 138901 [details]
example data

SUMMARY
Manual diff alignment is (was) a wonderful tool to help kdiff3 figure out alignment and often find the right conflict resolution after aligning manually.
Unfortunately between 1.8.4 and 1.9.2 something has changed to make the alignment markers non-effective.

STEPS TO REPRODUCE
1. Save attached {A,B,C}.txt
2. Run `kdiff3 -m A.txt B.txt C.txt`
3. Place alignment markers on the respective `(align here)` lines

OBSERVED RESULT
In 1.8.4, the alignment lines are in fact visually aligned. A correct conflict is reported and waits for resolution.

In 1.9.2, the alignment lines are in fact _not_ visually aligned. An incorrect automatic conflict resolution is produced that arbitrarily orders the conflicting changes!

Please see screenshots.


EXPECTED RESULT
The correct behaviour observed in 1.8.4.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: openSUSE Tumbleweed snapshot 20210524
(available in About System)
KDE Frameworks 5.82.0
Qt 5.15.2 (built against 5.15.2)
The xcb windowing system

ADDITIONAL INFORMATION
The 1.8.4 behaviour was recorded with openSUSE Tumbleweed snapshot 20210106.
Comment 1 Tilman Vogel 2021-05-31 13:59:19 UTC
Created attachment 138902 [details]
A.txt
Comment 2 Tilman Vogel 2021-05-31 13:59:30 UTC
Created attachment 138903 [details]
B.txt
Comment 3 Tilman Vogel 2021-05-31 13:59:38 UTC
Created attachment 138904 [details]
C.txt
Comment 4 Tilman Vogel 2021-05-31 13:59:56 UTC
Created attachment 138905 [details]
Screenshot from 1.8.4 (correct behaviour)
Comment 5 Tilman Vogel 2021-05-31 14:00:16 UTC
Created attachment 138906 [details]
Screenshot from 1.9.2 (incorrect behaviour)
Comment 6 Tilman Vogel 2021-06-02 12:22:19 UTC
Made a fix:
https://invent.kde.org/sdk/kdiff3/-/merge_requests/30
Comment 7 michael 2021-06-18 19:33:47 UTC
Git commit ce1cd562a2d080411928ec1e424a732f2bc69c8d by Michael Reeves.
Committed on 18/06/2021 at 18:34.
Pushed by mreeves into branch '1.9'.

Fix broken loop end condition

Regression by enum refactoring

(cherry picked from commit 93013769aaa5dc8b863c2a35350f7df535b1dd6a)
FIXED-IN:1.9.3

M  +1    -1    src/diff.cpp

https://invent.kde.org/sdk/kdiff3/commit/ce1cd562a2d080411928ec1e424a732f2bc69c8d