Bug 388239

Summary: kate long line wrapping only works after restart
Product: [Applications] kate Reporter: krichter
Component: applicationAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED INTENTIONAL    
Severity: wishlist CC: christoph, david.engraf, justin.zobel
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: allows to reproduce (open in another editor and paste into kate)

Description krichter 2017-12-26 07:58:42 UTC
Created attachment 109524 [details]
allows to reproduce (open in another editor and paste into kate)

When creating extremely long lines in `kate` (most likely through pasting), the view jumps to the end of the line when scrolling down and to the beginning when scrolling up which makes it impossible to read the middle. This issues is avoided after a restart when `kate` provides a view with line breaks (and an option to save it).

The scrolling shouldn't be different for long lines because not only the skipping of the middle part is an issue, but the jumping of the scroll interval as well.

A possible use case is pasting web server integration test logs containing base64-encoded screenshot which are ready to run on a headless CI server. A few 100 KB in one base64-encoded line can easily have a few million characters. Even it the use case is rare, `kate` should be capable of handling it.

experienced with 17.08.3 on Kubuntu 18.04-daily
Comment 1 Justin Zobel 2020-11-05 04:45:26 UTC
Thanks for the report and apologies for the delay in response.

Can you please confirm if this problem still exists in recent versions of kate, thanks.
Comment 2 krichter 2020-11-12 09:09:02 UTC
This is still an issue. My testcase is:

1. Disable line wrap in kate
2. Run `openssl rand -hex 1000000 | xsel --clipboard`
3. Paste into kate

The current result is that kate freezes and needs to be sigkilled. The expected outcome is that it should not freeze and handle the overlong line like it handles overlong lines when opening files.
Comment 3 krichter 2020-11-12 09:10:42 UTC
I tested this with 20.04.0 installed through snap on Ubuntu 20.04.1
Comment 4 Justin Zobel 2020-11-12 09:15:57 UTC
Information provided. Needs investigation.
Comment 5 Christoph Cullmann 2022-09-24 22:13:40 UTC
ATM pasted stuff isn't wrapped.
Perhaps that would be a good idea, to avoid freezes or crashes.
Patches are welcome.
Comment 6 Christoph Cullmann 2024-03-15 20:04:12 UTC
Not implemented, if somebody wants to have that, please submit a patch.

So far there was no interest to implement that for years.

https://kate-editor.org/join-us/