Bug 343526 - Only last 4 digits of line numbers are shown for source file
Summary: Only last 4 digits of line numbers are shown for source file
Status: REPORTED
Alias: None
Product: kompare
Classification: Applications
Component: viewpart (show other bugs)
Version: 4.1.22082
Platform: openSUSE Linux
: NOR minor
Target Milestone: ---
Assignee: Kompare developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-29 14:42 UTC by Joachim Wagner
Modified: 2023-04-17 05:36 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Example patch file triggering the bug (168.94 KB, patch)
2015-01-29 14:56 UTC, Joachim Wagner
Details
Screenshot showing the bug (36.66 KB, image/png)
2015-01-29 14:58 UTC, Joachim Wagner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joachim Wagner 2015-01-29 14:42:31 UTC
When viewing a patch file with about 5,000 lines produced with "diff -U 5" for a pair of files with about 40,000 lines, the left file display shows only the last 4 digits of the line number while the right view shows all 5 digits.

Reproducible: Always

Steps to Reproduce:
1.open patch file
2.choose in the top-right selection box a range with 5 digit line numbers
3.observe bug in line number column of the lower-left box

Actual Results:  
The line number column of the bottom-left box shows only up to 4 digits of the line number. These seem to be the right-most digits of the line number.

Expected Results:  
The line number column should automatically expand to 5 and more columns as needed.

The view for the right (target file) does this correctly, at least for 5 digit line numbers (didn't test 6 digits).

Workaround: Only memorise last 4 digists from top-right box when trying to locate ranges in the bottom-right.
Comment 1 Joachim Wagner 2015-01-29 14:56:54 UTC
Created attachment 90789 [details]
Example patch file triggering the bug

Example patch file triggering the bug. I decided to use a real-world example as a minimal working example wouldn't be much smaller as the example must reach 5 digit line numbers.

This patch compares old and new version of a Project Gutenberg book. The first column is a simple "One word per line" dump of each text file as I'm not interested in whitespace changes. The 2nd and 3rd column repeat the following 2 words to reduce unwanted coincidental matches.
Comment 2 Joachim Wagner 2015-01-29 14:58:16 UTC
Created attachment 90790 [details]
Screenshot showing the bug

Compare line numbers in the left to the expected range according to the top-right selection.
Comment 3 Justin Zobel 2022-10-14 05:46:51 UTC
Thank you for reporting this bug in KDE software. As it has been a while since this issue was reported and confirmed, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "CONFIRMED" when replying. Thank you!
Comment 4 Joachim Wagner 2022-10-14 10:53:56 UTC
Is Kompare 4.1.3 shipped with openSUSE Leap 15.3 recent enough? Both columns have improved. The target file column shows all 5 digits. However, the source file column (left), shows the first of the 5 digits only partially, "3" cannot be distinguished from "8" and "4" is just a line with a hook or a "1" turned 180 degrees.

You can easily test it with your version by downloading the attachment from comment 1, rename it to have an extension ".patch" and open it with Kompare.
Comment 5 Joachim Wagner 2022-10-14 15:25:06 UTC
Actually, the improvement seems to be fully due to the bigger screen I have now. If I shrink the window to approximately the size of the screenshot in comment 2 from 2015, the 1st digit in the left column disappears completely as in 2015.
Comment 6 Bug Janitor Service 2022-10-29 05:02:17 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 7 Joachim Wagner 2022-11-01 16:50:45 UTC
Also confirmed in Kompare 4.1.22082 of KDE 5.99.0 + Qt 5.15.6 in openSUSE Tumbleweed 2022-10-31.
Comment 8 Nathan Mills 2023-04-17 05:36:27 UTC
I can confirm this bug happens with Kompare on openSUSE 15.4 WSL1 on Windows 10. I am working on a pull request for a game (Globulation 2), which significantly changes the game, so the patch is over 600 lines of changes. I pulled master, then did a `git rebase -i master` on the PR branch, then I did a `git log -p master..branch-name > branch-name-old.patch` and `git log -p master..branch-name-new.patch`. Finally, I ran kompare on both patch files and scrolled down a lot and it only shows the last 3 digits of the line number once it goes past 1000. I can provide the patch files or a screenshot if needed.

Kompare version 4.1.21123 
openSUSE version 15.4
VcXsrv version: 1.20.14.0 (31 Dec 2021)
Qt version 5.15.2
WSL version:
> WSL version: 1.1.3.0
> Kernel version: 5.15.90.1
> WSLg version: 1.0.49
> MSRDC version: 1.2.3770
> Direct3D version: 1.608.2-61064218
> DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
> Windows version: 10.0.19045.2846

Qt version:
> libQt5Widgets5-5.15.2+kde294-150400.6.3.1.x86_64
> libQt5Gui5-5.15.2+kde294-150400.6.3.1.x86_64
> libQt5Core5-5.15.2+kde294-150400.6.3.1.x86_64
> libQtQuick5-5.15.2+kde43-150400.2.5.x86_64
> libQt5PrintSupport5-5.15.2+kde294-150400.6.3.1.x86_64
> libQt5Xml5-5.15.2+kde294-150400.6.3.1.x86_64
> libQt5Network5-5.15.2+kde294-150400.6.3.1.x86_64
> libQt5DBus5-5.15.2+kde294-150400.6.3.1.x86_64
> libQt5TextToSpeech5-5.15.2+kde2-150400.1.6.x86_64
> libQt5X11Extras5-5.15.2+kde1-150400.1.5.x86_64
> libQt5WaylandClient5-5.15.2+kde54-150400.1.4.x86_64
> libQt5Svg5-5.15.2+kde16-150400.1.5.x86_64