Bug 303598 - katepart line length limit silently reformats files with large lines on save
Summary: katepart line length limit silently reformats files with large lines on save
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: part (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
: 311945 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-07-16 06:42 UTC by FeepingCreature
Modified: 2013-02-01 08:56 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description FeepingCreature 2012-07-16 06:42:23 UTC
katepart's line length limit should either be disabled by default, set to a very large value by default, give a warning when trying to save a file that originally had lines longer than 1024 characters or disable the line length enforcement when opening a file that already has longer lines (though that may cause issues when editing a line to push it over 1024).

It is extremely bad form to silently rewrite people's files on save.

Reproducible: Always

Steps to Reproduce:
1. Open a file with lines larger than 1024 characters in kate/kwrite
2. Save
3. Enjoy your silent breakage
Actual Results:  
Long lines were silently reformatted

Expected Results:  
Long lines should be unaffected

Silently rewriting users' data is a cardinal sin of editing.
Comment 1 Christoph Cullmann 2012-11-01 00:53:43 UTC
No, the problem is that Kate until current kate.git master doesn't show the dialog on open. This is fixed now in master branch by having "nice" inline message for this in the view. This is still work in progress but such bugs as this one should no longer happen as the user is now informed, unlike before. Sorry for the problems :(
Now Kate will inform you correctly about wrapped lines, and yes, the limit will be increased, too.
Comment 2 Christoph Cullmann 2012-11-01 00:54:27 UTC
Git commit 774e209223a292aad14e24054fe78fa128e92cc7 by Christoph Cullmann.
Committed on 01/11/2012 at 01:54.
Pushed by cullmann into branch 'master'.

increase line limit to 4KB
new try

M  +1    -1    part/utils/kateconfig.cpp

http://commits.kde.org/kate/774e209223a292aad14e24054fe78fa128e92cc7
Comment 3 FeepingCreature 2012-11-01 02:18:34 UTC
Thank you! :)
Comment 4 Dominik Haumann 2013-02-01 08:56:55 UTC
*** Bug 311945 has been marked as a duplicate of this bug. ***