Bug 490857 - CTRL+ALT+J puts caret to wrong position
Summary: CTRL+ALT+J puts caret to wrong position
Status: CLOSED DUPLICATE of bug 243030
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 4.6   Edit
Hardware: PC Windows 7
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-01 03:38 EDT by Armin Miedl CLA
Modified: 2016-04-05 03:02 EDT (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 Armin Miedl CLA 2016-04-01 03:38:56 EDT
When doing a CTRL+ALT+J to delete this line's line break and to merge this line with the next line, the caret is put to the end of the newly created line. This is annoying. Especially because there is a blank inserted between the two old lines, which I want to delete again. So it would be better to position the caret at the end of the first line before the two lines are merged.

Alternatively I think it is a good idea to omit the blank between the two merged lines. On the other hand, sometimes this blank makes sense.
Comment 1 Brian de Alwis CLA 2016-04-01 14:02:01 EDT
The join-lines functionality was tracked by bug 41573.  The single-space-joint behaviour you're describing is consistent with how vi implements join-lines.

Perhaps you could provide a patch to allow the joint to be configured using a preference?

Action: org.eclipse.ui.texteditor.JoinLinesAction

The action and its joint is configured by org.eclipse.ui.texteditor.AbstractTextEditor#createActions()

Preference page: org.eclipse.ui.internal.editors.text.TextEditorDefaultsPreferencePage
Comment 2 Dani Megert CLA 2016-04-05 03:02:14 EDT
(In reply to Armin Miedl from comment #0)
> Alternatively I think it is a good idea to omit the blank between the two
> merged lines.

This is tracked by bug 412412.

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