Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 66180 - [typing] Pasting text that is single line commented removes whitespace.
Summary: [typing] Pasting text that is single line commented removes whitespace.
Status: RESOLVED DUPLICATE of bug 65949
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Tom Eicher CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-08 13:05 EDT by Luis de Diego CLA
Modified: 2004-07-19 10:59 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luis de Diego CLA 2004-06-08 13:05:19 EDT
Doing a copy-paste operation on code commented out with the single line comment
operator (//) but with white space between the // and the text gets pasted with
the writespace removed.

The text
//  RELEASE:        $$Revision: 1.4 $$
gets pasted as
//RELEASE:        $$Revision: 1.4 $$

This is also valid for any line that is pasted that starts with whitespace (as
expected).

If the block starts with /* and any block line starts with a non whitespace
character at column 1 then the lines after this one get pasted with all
whitespace intact while lines before get the whitespace are trimmed.

Whitespace is trimmed out up to the position of the first non whitespace on
pasted commented lines. In the later example, if the non whitespace character is
on column 2 then next lines are trimmed by 1 space. If column is number 3 they
get trimmed by 2 spaces and so on.
Comment 1 Tom Sardella CLA 2004-07-15 14:25:15 EDT
I have the same problem when in Smart Insert Mode.  I don't know if this is the
proper behavior when in that mode, but to get around it I temporarily turn off
Smart Insert Mode (Ctrl+Shift+Insert).

Also, this appears to be a duplicate of Bug #65949.
Comment 2 Tom Hofmann CLA 2004-07-19 10:59:02 EDT
right - marking as dup and adding a comment there.

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