Bug 482396 - Window is resized to random size when lines are too long
Summary: Window is resized to random size when lines are too long
Status: CONFIRMED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: Git
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-04 16:22 UTC by Riccardo Robecchi
Modified: 2025-04-23 20:03 UTC (History)
1 user (show)

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


Attachments
Screenshot (118.29 KB, image/jpeg)
2024-03-07 23:46 UTC, Riccardo Robecchi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Riccardo Robecchi 2024-03-04 16:22:10 UTC
SUMMARY
Kate displays a warning when opening a file which is large and requires it to raise the limit for the line length. This warning, however, makes the window resize to a seemingly random size. This is very inconvenient as it requires the user to manually restore the window to the desired size every time.

STEPS TO REPRODUCE
1. Open a file with more than 4,096 characters in one line

OBSERVED RESULT
Kate shows a warning and changes its window size.

EXPECTED RESULT
Kate shows a warning and does not change its window size.

SOFTWARE/OS VERSIONS
Linux: KDE neon
KDE Plasma Version: 5.27.10
KDE Frameworks Version: 5.114.0
Qt Version: 5.15.12

ADDITIONAL INFORMATION
Comment 1 Christoph Cullmann 2024-03-07 19:48:47 UTC
Can not reproduce that, for me the message in that warning properly wraps.

Could you retry with 24.02?
Comment 2 Riccardo Robecchi 2024-03-07 23:46:59 UTC
Created attachment 166651 [details]
Screenshot

(In reply to Christoph Cullmann from comment #1)
> Can not reproduce that, for me the message in that warning properly wraps.
> 
> Could you retry with 24.02?

The message wraps correctly here as well, but that's not the issue at all. The problem is that Kate's window is resized. It looks like this only happens when the window is smaller than a certain threshold. To give you a reference point, it displays this behaviour when it is as big as a 77x23 Konsole window (on a Full-HD monitor with 100% scaling). If you make Kate's window that big and try to open a file which displays the warning, you will see that Kate's window becomes bigger (specifically, much taller).
It looks as if it is trying to preserve the same visible area that shows text while also showing the warning, which of course means the window needs to be taller.
See the attached screenshot for visual reference: the window on the left displays the warning, the one on the right is the normal size. The one on the left does not return to the previous size once it becomes bigger.
Comment 3 Christoph Cullmann 2025-04-23 20:03:30 UTC
Ok, can reproduce with master, the 'text area' will stay the same size and enlarge the window for me, too.