Bug 333220 - [typing] Cursor Position after join lines
Summary: [typing] Cursor Position after join lines
Status: CLOSED DUPLICATE of bug 243030
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-26 13:56 EST by Andres Gomez Casanova CLA
Modified: 2011-01-03 04:23 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***