Bug 298496

Summary: undesired wrapping in comments with static word wrap and search/replace
Product: [Applications] kate Reporter: Jonas <jonas743>
Component: partAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED INTENTIONAL    
Severity: normal CC: cullmann
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:

Description Jonas 2012-04-20 16:25:50 UTC
I'm using kile with static word wrap.

If I make a search/replace over a file it is possible that lines in a commented paragraph suddenly get wrapped, 
- either because the paragraph was not wrapped properly before (possible since commenting results in two extra characters in each line, and commenting doesn't wrap)
- or because I replace a shorter string with a longer one.

Since the wrapping of commented lines does not automatically comment the overflowing parts, it is possible that I end up with isolated uncommented words in a commented paragraph.

This is especially problematic since one normally doesn't even notice that anything went wrong before re-reading the document and finding random words occuring.

One possibility to resolve that might be to fix the word wrapping code in connection with comments, but there doesn't see to be a consensus on the right way to do it (see bug 105373).

Therefore I propose to deactivate all static wrapping during search/replace.


Reproducible: Always
Comment 1 Christoph Cullmann 2012-11-01 14:23:45 UTC
Sorry, but that makes this even more confusing then.
The whole "static word wrap" system is a horrible bad idea.
Now at least it is consistent, that all editing actions will trigger it.
Actually sometime this whole static word wrap should be deleted and moved to a script which allows you to fast wrap the last paragraph or so.