Registered Member
|
Hi. KDE 4.8.3 on PCLinuxOS 64-bit.
In opening already existing text files, a popup message warns the document "was opened and contained too many long lines (more than 1024 characters). Too long lines were wrapped and the document is set to read-only mode, as saving will modify its content." Is there a way to bypass this limitation? Perhaps a patch to the source code (I believe it's Kate) so we can repackage the app again? Thank you for any assistance. Peace and much respect, Archie EDIT: Never mind, I found the way to set the Line Length Limit to unlimited. Just in case anyone runs into the same problem, go to Settings > Configure Editor. Click Open/Save and change the Line Length Limit from 1024 to 0. Click OK and your long lines are back for editing.
What is necessary is never unwise. --Sarek, 2258.42
|
Registered Member
|
I just upgraded and ran into this problem myself. I am very disappointed that this change was made. KDE, what were you thinking?!
This is a very poorly thought out change. You don't tell us how to override, which means that Kate and KDevelop are useless for people who need to edit large files and who don't find the undocumented workaround. Undocumented. UNDOCUMENTED!!!!! There are a lot of other people who are upset as well: http://olezfdtd.wordpress.com/2012/04/0 ... -and-kile/ What's the problem with long lines? Do they screw up syntax highlighting or something? Then show the user a message like
|
Global Moderator
|
As far as I know, the reason is that kate gets somewhat slow if you have very long lines and try to edit that file. I also think the default limit was raised to 2^16 chars recently, which sounds more acceptable. But that's not in 4.8.
The reasoning behind this limitation was, I think, that kate is meant to be an editor for program source code, which will almost never contain such long lines. Greetings
I'm working on the KDevelop IDE.
|
Registered Member
|
Ok, good
I'm not so certain about that "almost never" part Here's a tarball with two C++ files. One file has a line with >42000 characters; the other file has >407000 lines. https://docs.google.com/open?id=0B1aZBD ... HU0aXk1b2M If you want proof that it's valid c++:
The last line prints the number of lines and max line length for two files. I cannot guarantee that it will compile with anything other than GCC, including clang; MSVC and Borland are both known to have problems with code generated by this program (>2048 chars in a static string, >127 nested if-else, >16384 functions in a compilation unit, etc... ) Regards Mark |
Global Moderator
|
Hi there,
no doubt you can do that! Of course you can. It's just... it usually doesn't happen. (Although 1024 chars is *really* low, for LaTeX source files I can easily exceed that number, as I usually write a paragraph without newlines, and use the editor line wrapping feature instead) I also don't think the limit is a good idea. I just wanted to explain the reasoning behind it. Greetings, Sven
I'm working on the KDevelop IDE.
|
Registered Member
|
However the default settings was implemented at least it's good to know there's an option to override the "imposed" limitation.
What is necessary is never unwise. --Sarek, 2258.42
|
Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell