How to solve the problem that KDiff adds extra blank lines when resolving merge conflicts?
Asked Answered
F

2

6

How to solve the problem that KDiff adds extra blank lines when resolving merge conflicts? Changing the end line and encoding in the settings to any others does not help.

If before running git mergetool we have:

line1
line2
line3

then after starting and resolving the conflict:

line1

line2

line3
Ferreby answered 14/9, 2021 at 11:47 Comment(3)
Can you inspect, with an editor able to display non printable characters for example, or using a hex dumper, what line endings you have in the original file, and what line endings you have in the result of kdiff merge ?Sic
I have used both windows and unix line endings, the result is the same. Also tried setting up auto-detecting end linesFerreby
I'm having the same problem (all my files have a single CR + LF pair line endings)Downward
K
10

This is a bug introduced in KDiff3 version 1.8.6.

To fix it, uninstall your version of KDiff3 and install KDiff3 version 1.8.5. It should work.

Here is a link to download: https://download.kde.org/stable/kdiff3/

References:

EDIT: This bug is fixed in 1.9.5 as per https://bugs.kde.org/show_bug.cgi?id=442199

Kelliekellina answered 2/10, 2021 at 9:52 Comment(4)
Still broken in 1.9.3 (at least on Windows) invent.kde.org/sdk/kdiff3/-/issues/26Reversion
The download link no longer contains any links to any 1.8.x versions 😕Reversion
The upcoming 1.9.4 fixes this. If you have 1.8.6 that's not an official release but It may well be affected. The 1.9 branch broke a few things. Unix style lines should work in 1.9.3 as a workaround.Peekaboo
Meanwhile here is a link for KDiff3 1.8.5 win 64: mirrors.ocf.berkeley.edu/kde/Attic/kdiff3/…Rachelrachele
I
4

FYI, I had this bug with 1.9.4. Upgrading to 1.9.5 fixes that.

Ilowell answered 23/3, 2022 at 6:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.