Bug 471234 - Moving between Deltas in the Diff Windows doesn't work if Word Wrap is on
Summary: Moving between Deltas in the Diff Windows doesn't work if Word Wrap is on
Status: RESOLVED FIXED
Alias: None
Product: kdiff3
Classification: Applications
Component: application (show other bugs)
Version: 1.10.4
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: michael
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-19 17:46 UTC by Grósz Dániel
Modified: 2023-06-26 01:40 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 1.10.5
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Grósz Dániel 2023-06-19 17:46:14 UTC
SUMMARY
If Word Wrap Diff Windows is on, the Move to Next Delta and similar buttons scroll to the top of the diff panes instead of scrolling to a difference, also the active difference isn't highlighted. Scrolling and highlighting the differences only works in the Output pane.

STEPS TO REPRODUCE
1. Check Diffview/Word Wrap Diff Windows.
2. Press the Go to Next Delta button (or Go to Next Conflict, Go to Active Delta, Go to Previous Delta etc.).

OBSERVED RESULT
The diff panes are scrolled to the top, and no delta is highlighted.

EXPECTED RESULT
Works just like if word wrap is off, except lines are wrapped.

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20230613
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.107.0
Qt Version: 5.15.9
Kernel Version: 6.3.7-1-default (64-bit)
Graphics Platform: X11

ADDITIONAL INFORMATION
May be related to Bug 469817 (no text shown at all when word wrap was on) and Bug 442582 (similar bug except that it was the Output pane that was scrolled to the top instead of the next delta, rather than the Diff windows; also, the bug I'm reporting was mentioned in its Comment 4).
Comment 1 michael 2023-06-20 00:42:36 UTC
I believe this should be fixed now. The auto-wrap calculation has been restored to its original behavior.  Was related to 469817 in that both stem from that behavior change. The threads used for this were causing issues on exit from auto-merge. The underling cause being the use of two raw pointers that were shared with the main thread. Theses object could be destroyed on exit causing weird stack traces if a helper thread was still running. That mess has now been resolved properly.  Keeping this open for now in case there's something else that was overlooked.
Comment 2 Grósz Dániel 2023-06-20 01:47:43 UTC
No, I just built the latest master (9e64a479ad3c1588b436cb1b1e4c3b57972ff20b, with Qt 5), and this bug is present there too. The bug where no text was shown is fixed in both 1.10.4 and master.
Comment 3 michael 2023-06-26 01:37:58 UTC
Git commit 9b79dc1a4f07a743e2ec3dc5a760619453ba0141 by Michael Reeves.
Committed on 26/06/2023 at 01:36.
Pushed by mreeves into branch '1.10'.

Partial revert no need for shared_ptr in Diff3LineVector
FIXED-IN:1.10.5

M  +5    -5    src/diff.cpp
M  +2    -2    src/diff.h
M  +7    -7    src/difftextwindow.cpp

https://invent.kde.org/sdk/kdiff3/-/commit/9b79dc1a4f07a743e2ec3dc5a760619453ba0141
Comment 4 michael 2023-06-26 01:40:47 UTC
Git commit 6f383a2294393d526b7826c611fc7db228987eca by Michael Reeves.
Committed on 26/06/2023 at 01:40.
Pushed by mreeves into branch 'master'.

Partial revert no need for shared_ptr in Diff3LineVector
FIXED-IN:1.10.5

M  +5    -5    src/diff.cpp
M  +2    -2    src/diff.h
M  +7    -7    src/difftextwindow.cpp

https://invent.kde.org/sdk/kdiff3/-/commit/6f383a2294393d526b7826c611fc7db228987eca