Bug 575877 - Copy and paste adds last line twice
Summary: Copy and paste adds last line twice
Status: CLOSED DUPLICATE of bug 575872
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 4.22   Edit
Hardware: PC Linux
: P3 critical (vote)
Target Milestone: ---   Edit
Assignee: Platform-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2021-09-08 10:37 EDT by Lars Vogel CLA
Modified: 2021-09-08 10:51 EDT (History)
2 users (show)

See Also:


Attachments
Screencast (76.72 KB, image/gif)
2021-09-08 10:51 EDT, Lars Vogel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Vogel CLA 2021-09-08 10:37:19 EDT
Not sure since when but I I copy and paste lines in the Java editor the last line gets duplicated.

Example:

-------------

import org.eclipse.swt.graphics.*;
import org.eclipse.swt.widgets.*;

public class Snippet245 {

public static void main(String [] args) {
	var display = new Display();
	var shell = new Shell(display);
	
}
}

------------------

Copy the two var lines and paste them and you end up with:

import org.eclipse.swt.graphics.*;
import org.eclipse.swt.widgets.*;

public class Snippet245 {

public static void main(String [] args) {
	var display = new Display();
	var shell = new Shell(display);
	var display = new Display();
	var shell = new Shell(display);var display = new Display();
	
}
}
Comment 1 Lars Vogel CLA 2021-09-08 10:37:51 EDT
Tested with:

Eclipse SDK
Version: 2021-12 (4.22)
Build id: I20210907-1800
OS: Linux, v.5.11.0-31-generic, x86_64 / gtk 3.24.25, WebKit 2.32.3
Java vendor: AdoptOpenJDK
Java runtime version: 16.0.1+9
Java version: 16.0.1
Comment 2 Andrey Loskutov CLA 2021-09-08 10:46:12 EDT

*** This bug has been marked as a duplicate of bug 575872 ***
Comment 3 Lars Vogel CLA 2021-09-08 10:51:00 EDT
Created attachment 287108 [details]
Screencast