Bug 243345

Summary: Commenting blocks of text with wrapped lines does not work in Kile
Product: [Applications] kile Reporter: Thomas Damgaard <thomasdn>
Component: editorAssignee: Michel Ludwig <michel.ludwig>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: NOR    
Version: 2.0.85   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Thomas Damgaard 2010-07-01 14:25:49 UTC
Version:           2.0.85 (using KDE 4.4.2) 
OS:                Linux

If you mark a block of text that contains long (wrapped) lines and then press Ctrol+D to make it a comment, the wrapped part of lines are not correctly commented.



Reproducible: Didn't try

Steps to Reproduce:
Steps to Reproduce:
1: Settings > Editor > Editing > Enabled static word wrap, wrap words at 80
characters.
2: Type in the following text on an empty line:

foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar
foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar
foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar
foo bar foo bar
foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar
foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar
foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar
foo bar foo bar
foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar
foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar
foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar
foo bar foo bar
foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar
foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar
foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar
foo bar foo bar


3: Then mark the blok of text.
4: Press Ctrl+D to prepend every line with '% '
5: Notice that wrapped lines are incorrectly handled.

Actual Results:  
This text is produced:

% foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo
bar % foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar
foo bar % foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo
bar foo bar % foo bar foo bar
% foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo
bar % foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar
foo bar % foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo
bar foo bar % foo bar foo bar

Expected Results:  
This text would be expected:

% foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo
% bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar
% foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo
% bar foo bar foo bar foo bar
% foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo
% bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar
% foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo
% bar foo bar foo bar foo bar
Comment 1 Michel Ludwig 2010-07-03 19:55:16 UTC

*** This bug has been marked as a duplicate of bug 105373 ***