[Bug 145956] New: Kompare displays wrong line numbers in target file after applying a change
Olivier Vitrat
ovit.debian at gmail.com
Fri May 25 16:07:50 CEST 2007
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=145956
Summary: Kompare displays wrong line numbers in target file after
applying a change
Product: kompare
Version: unspecified
Platform: Debian stable
OS/Version: Linux
Status: UNCONFIRMED
Severity: normal
Priority: NOR
Component: general
AssignedTo: kompare-devel kde org
ReportedBy: ovit.debian gmail com
Version: (using KDE KDE 3.5.5)
Installed from: Debian stable Packages
Reported in Debian BTS at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=364881
Create two example files to reproduce the bug:
a.txt:
1a
2a
- new line inserted here -
- new line inserted here -
- new line inserted here -
- new line inserted here -
3a
4a
5a - modified -
6a - modified -
7a - modified -
8a
b.txt:
1a
2a
3a
4a
5a
6a
7a
8a
Then compare them: kompare a.txt b.txt
Apply the first difference (inserted lines).
Line numbers will be wrong in the target file.
Apply the second difference (modified lines).
Line numbers of modified lines will be copied
from the source file (a.txt). This behaviour
causes very strange line numbering in the target
file.
This bug is usually harmless, but causes problems
when you try to remember positions by target line
numbers to be able to do changes later. You will
easily write down wrong line numbers and will not
be able to locate these positions in the merged
target file in the source code editor later.
This is especially flustrating when merging fixes
between code bases of similar applications.
In my opinion, kompare should renumber target lines
after applying each difference from the source file
and ensure that line numbers are continuous as usual.
The difference graphics will show the source of such
lines, so copying source line numbers is rather a
wrong idea than a feature.
More information about the Kompare-devel
mailing list