You are here: PSPad forum > English discussion forum > Pspad slow/hangs on long text line with word wrap

Pspad slow/hangs on long text line with word wrap

#1 Pspad slow/hangs on long text line with word wrap

Posted by: tertius | Date: 2021-12-29 01:11 | IP: IP Logged

Occasionally, I open a txt file with no linefeeds or that contains very long lines. If word wrap is activated, Pspad hangs for a minute or more and isn't responding. Or is extremely slow while navigating.

The strange thing is, if I copy (ctrl-c) the slow text in pspad, create a new txt tab and paste it into the new tab, pspad is fast as usual. Word wrap is almost instant in the new tab even with the long line. It's required to create an empty file and paste the text there, it doesn't work if the text is cut and pasted to the same tab.

Is there something I can do about this and get fast word wrap without the need to copy+paste the text?

I'm speaking of a text that contains one line with approx. 73000 characters among other ordinary lines of just 10-100 characters.

Options: Reply | Quote | Up ^


#2 Re: Pspad slow/hangs on long text line with word wrap

Posted by: pspad | Date: 2021-12-29 05:15 | IP: IP Logged

Hello

Long lines are limitation of base editor component by design.
What kind of file is it? Is it necessary to keep such long lines?
If can be wrapped, use hard wrap. Select whole text (Ctrl+A) and wrap it with menu Format / Block format / Reformat (Shift+Ctrl+K)

Options: Reply | Quote | Up ^


#3 Re: Pspad slow/hangs on long text line with word wrap

Posted by: tertius | Date: 2021-12-29 23:40 | IP: IP Logged

pspad:
Long lines are limitation of base editor component by design.
What kind of file is it? Is it necessary to keep such long lines?

They are random files. Sometimes it is a generated xml or json file without line feeds - whole file in one line.
My last encounter was text for a forum post, where the forum allowed to include base64-encoded data in a custom bbcode tag. You write ordinary text for your post, and for some special forum function, you include base64 data within tags like this: [bp]...base64 data ... [/bp] This base64 data is provided by the game the forum is for, as single line without spaces and linefeeds, and the purpose of that tag in the forum is data exchange of game blueprints between gamers. The blueprint data length has no limit (the largest I encountered is 2 MB). Hard word wrap destroys the blueprint, as far as I remember.

Currently, I have to use a different editor for this kind of data, since Pspad isn't suited to handle it.

It gets more often that I'm trapped with a hanging pspad due to a long line. In the past, there were hardly any longer lines, but nowadays there are more and more.

Edited 1 time(s). Last edit at 2021-12-29 23:41 by tertius.

Options: Reply | Quote | Up ^


#4 Re: Pspad slow/hangs on long text line with word wrap

Posted by: pspad | Date: 2021-12-30 05:32 | IP: IP Logged

Pspad has tool for rewrap Html, xml, json
At least you can read it

BB codes can be easily wrapped after specific code (line feed) without corrupting it

Options: Reply | Quote | Up ^






Editor PSPad - freeware editor, © 2001 - 2022 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR