Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 333220

Summary: [typing] Cursor Position after join lines
Product: [Eclipse Project] JDT Reporter: Andres Gomez Casanova <angoca>
Component: TextAssignee: JDT-Text-Inbox <jdt-text-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, deepakazad
Version: 3.7   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Andres Gomez Casanova CLA 2010-12-26 13:56:44 EST
Build Identifier: I20101208-1300

I think the cursor position after a 'Join lines' (Ctrl + Alt + j) should be between the two joint lines, and not at the end of the line. This helps to edit the new joint line, and to not go back to the middle.
In 'vi', the behavior of ctrl+j is like that. It does not matter where the cursor is in the first line, the application will join the lines, and put the cursor after the "old" end of the first line, in the added space that is before the "old" second line.

Let's say the cursor is the underscore, and the join line option is called there.

// First_line
// Second line

Then, after the operation, the cursor and the lines should be

// First line_// Second line

As you can see, the cursor is between the "old" two lines.

The current behavior is like that

// First line // Second line_

And you should have to go back. This is uncomfortable to edit comments.


Reproducible: Always
Comment 1 Deepak Azad CLA 2010-12-27 14:14:59 EST
The joining comments case is mentioned in bug 179782 comment 0.

*** This bug has been marked as a duplicate of bug 179782 ***
Comment 2 Dani Megert CLA 2011-01-03 04:23:34 EST

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