Bug 26590 - cut and paste adds an extra tab
Summary: cut and paste adds an extra tab
Status: RESOLVED DUPLICATE of bug 29909
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows NT
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-11-18 10:41 EST by Nikolay Metchev CLA
Modified: 2003-02-12 06:15 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nikolay Metchev CLA 2002-11-18 10:41:58 EST
Whenever you cut/copy and paste there seems to be an extra tab in each line 
that is pasted. This happens in the editor window.
Comment 1 Kai-Uwe Maetzel CLA 2002-11-18 11:47:52 EST
Cannot reproduce on I20021115.
Comment 2 Nikolay Metchev CLA 2002-11-18 12:32:11 EST
in Window->Preferences 
choose
Java->Editor->Behaviour
if Smart Pasting for indentation is selected then it always adds an extra tab 
and even an extra space (I have set my tab length to 3 spaces and have chosen 
to replace tabs with spaces).
Perhaps I don't understand how this works but it certainly doesn't do anything 
useful.
Comment 3 Kai-Uwe Maetzel CLA 2002-11-18 12:54:47 EST
On the current build I20021115 using your settings it works as expected. The 
indentation string uses the appropriated number of spaces as indicated on the 
formatter page.

When reopening indicate your build number and give precises steps to reproduce.
Comment 4 Nikolay Metchev CLA 2002-11-19 07:23:59 EST
before copying :
--------------------
public class Test
{
   private String field1;

   public Test()
   {
      
   }
}
-----------------------
select line 3 of the above code by placing the cursor just before the word 
private and hitting shift+END. copy the text by pressing Ctrl+C. Go to the  
next line and paste. Result:
-------------------------
public class Test
{
   private String field1;
        private String field1;           
   public Test()
   {
      
   }
}
-------------------------------
move inside the constructor and paste again:
------------------------------
public class Test
{
   private String field1;
        private String field1;           
   public Test()
   {
           private String field1;
   }
}
--------------------------
In both cases it indents it too far. In the first case it indents it by 5 
spaces???? and in the second case by 8 spaces!!!. Once again my tabs-to-spaces 
ratio is set to 3. I don't belive that the above is correct functionality. My 
build number is 200211151436. I am sorry that I didn't explain myself better in 
the previous two bug submits.
Comment 5 Nikolay Metchev CLA 2003-02-12 06:15:19 EST

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