Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 326242 - [typing] Smart 'Home'/'End' key moves in wrong direction
Summary: [typing] Smart 'Home'/'End' key moves in wrong direction
Status: RESOLVED INVALID
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.5.1   Edit
Hardware: PC Linux
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Platform-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-25 16:54 EDT by test_test_testing CLA
Modified: 2010-09-28 02:55 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description test_test_testing CLA 2010-09-25 16:54:23 EDT
Build Identifier: M20100211-1343

In the Eclipse text editor, the Smart Home/End keys can move in the wrong direction (see Steps to reproduce) if the caret is on a line consisting entirely of tabs or spaces and the caret is not at the beginning/end of the line.

Reproducible: Always

Steps to Reproduce:
1. Create a new Untitled Text File (though any type of text file should work).
2. Indent twice (i.e. press Tab, then Tab again).
3. Move to between the two tab characters.
4. Press Home.

Result: The caret is moved to the *end* of the line if you press Home, and *beginning* of the line if you press End.
This also happens with spaces instead of tabs.
Comment 1 Dani Megert CLA 2010-09-27 02:23:44 EDT
That's the "smart" part of the action. You can disable this if you don't like it.
Comment 2 test_test_testing CLA 2010-09-27 12:16:26 EDT
I get your point, but if you press 'End', wouldn't the expected action still be to move to the end of the line, not the beginning?

(I originally noticed this for the 'End' key, but then somehow erroneously included the 'Home' key in the bug report as well - sorry about that.)
Comment 3 Dani Megert CLA 2010-09-28 02:55:06 EDT
class foo {}(In reply to comment #2)
> I get your point, but if you press 'End', wouldn't the expected action still be
> to move to the end of the line, not the beginning?
Well, it does. However, in your example you only have trailing whitespace in which case both ends actually serve as the end of "real" text.