[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#364881: kompare: Kompare displays wrong line numbers in target file after applying a change

Package: kompare
Version: 4:3.5.2-1
Severity: normal

Create two example files to reproduce the bug:


- new line inserted here -
- new line inserted here -
- new line inserted here -
- new line inserted here -
5a - modified -
6a - modified -
7a - modified -



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

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.

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.14-sirius-20051219-0354
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages kompare depends on:
ii  kdelibs4c2a               4:3.5.2-2+b1   core libraries for all KDE applica
ii  libacl1                   2.2.36-1       Access control list shared library
ii  libart-2.0-2              2.3.17-1       Library of functions for 2D graphi
ii  libattr1                  2.4.32-1       Extended attribute shared library
ii  libaudio2                 1.7-8          The Network Audio System (NAS). (s
ii  libc6                     2.3.6-7        GNU C Library: Shared libraries
ii  libfam0                   2.7.0-9        Client library to control the FAM 
ii  libfontconfig1            2.3.2-5.1      generic font configuration library
ii  libfreetype6              2.1.10-3       FreeType 2 font engine, shared lib
ii  libgcc1                   1:4.1.0-1+b1   GCC support library
ii  libice6                   6.9.0.dfsg.1-6 Inter-Client Exchange library
ii  libidn11                  0.5.18-2       GNU libidn library, implementation
ii  libjpeg62                 6b-12          The Independent JPEG Group's JPEG 
ii  libpng12-0                1.2.8rel-5.1   PNG library - runtime
ii  libqt3-mt                 3:3.3.6-1      Qt GUI Library (Threaded runtime v
ii  libsm6                    6.9.0.dfsg.1-6 X Window System Session Management
ii  libstdc++6                4.1.0-1+b1     The GNU Standard C++ Library v3
ii  libx11-6                  6.9.0.dfsg.1-6 X Window System protocol client li
ii  libxcursor1               1.1.3-1        X cursor management library
ii  libxext6                  6.9.0.dfsg.1-6 X Window System miscellaneous exte
ii  libxft2             FreeType-based font drawing librar
ii  libxi6                    6.9.0.dfsg.1-6 X Window System Input extension li
ii  libxinerama1              6.9.0.dfsg.1-6 X Window System multi-head display
ii  libxrandr2                6.9.0.dfsg.1-6 X Window System Resize, Rotate and
ii  libxrender1               1:    X Rendering Extension client libra
ii  libxt6                    6.9.0.dfsg.1-6 X Toolkit Intrinsics
ii  zlib1g                    1:1.2.3-11     compression library - runtime

kompare recommends no packages.

-- no debconf information

Reply to: