bugww - editor - Bugs: bug #11532, "Paste" adds text with...

 
 

bug #11532: "Paste" adds text with incorrect indentation

Submitted by:  Tzvetan Mikov <mikov>
Submitted on:  Sat 08 Jan 2005 08:24:48 PM UTC  
 
Category: NoneSeverity: 4 - Important
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: petar marinov <lotzmana>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 06 Sep 2007 04:57:09 AM UTC, comment #2:

fixed. will be part of build 51.

I implemented entirely new algorithm that detects what is the correct indentation of a paste. It is smaller and simpler than the previous. Also I believe it covers correctly all cases.

petar marinov <lotzmana>
Project AdministratorIn charge of this item.
Fri 22 Apr 2005 09:11:09 PM UTC, comment #1:

documenting cases:
1. paste into pos 0 on an empty line, then the text is pasted at pos 0. it is indented correctly if it is pasted into line with some contents (and the line is moved down)

Anonymous
Sat 08 Jan 2005 08:24:48 PM UTC, original submission:

Sometimes (quite often in my experience) pasting from the clipboard adds the text with incorrect indentation, even though the copied text had correct indentation.
I have classified the bug as "major" because pasting is pretty major functionality and should work 100% reliably.

In the example below the lines are numbered, but they shouldn't be for the actual test.

1:public class MyClass
2:{
3: private static class InnerClass
4: {
5: private int x;
6:
7: }
8:}

Steps to repoduce the bug:
- Goto the beginning of line 5 and mark it by holding the shift and pressking down arrow
- Copy it to clipboard - Ctrl+C
- The cursor is currently at the beginning line 6. Hide the selection with Ctrl+K+H (or by moving the cursor up and down)
- Paste the selection with Ctrl+V

The result is this:

public class MyClass
{
private static class InnerClass
{
private int x;
private int x;

}
}

Moral of the story: better to have "dumb paste" than "smart paste" which doesn't work :-)

Tzvetan Mikov <mikov>
Project Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by lotzmana (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 06 Sep 2007 04:57:09 AM UTClotzmanaStatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1