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

Bug 406380

Summary: [non-Windows] Pressing the up arrow from the first line should jump to beginning of the line
Product: [ECD] Orion Reporter: Matt N. <mmn100+eclipse>
Component: EditorAssignee: Silenio Quarti <Silenio_Quarti>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ken_walker, mihai.sucan, Silenio_Quarti
Version: unspecified   
Target Milestone: 3.0 M2   
Hardware: Macintosh   
OS: Mac OS X   
Whiteboard:

Description Matt N. CLA 2013-04-23 19:11:14 EDT
This is a non-Windows feature that I rely on for quick navigation.

STR A:
1) Add just one line of text to the top of the editor
2) Place the caret somewhere after the beginning
3) Press the up arrow on the keyboard

Expected result:
The caret moves to the beginning of the textbox (i.e. the beginning of the line)

Actual result:
Nothing happens

This behaviour seems to be standard on OS X (e.g. TextEdit and all other text inputs) and Linux (e.g. gedit and Firefox).

STR B (with selection):
1) Add just one line of text to the top of the editor
2) Place the caret somewhere after the beginning
3) Hold down <shift>
4) Press the up arrow on the keyboard

Expected result:
All characters to the left of the caret are selected. Caret moves to beginning of the field.

Actual result:
Nothing happens.
Comment 1 Matt N. CLA 2013-04-23 20:13:35 EDT
Note that the same applies to pressing the down arrow on the last line: the caret should move to the end of that line.
Comment 2 Ken Walker CLA 2013-04-23 20:55:19 EDT
At least on the Mac I tried textedit, Pages, TextMate and sublime and all behave as described.  Will have to try some windows editors at work tomorrow.
Comment 3 Silenio Quarti CLA 2013-04-24 10:22:36 EDT
I believe STR B is already the current behavior. If that is not the case for you, please add more details (which browser and OS?).

For STR A, we are matching the behavior of StyledText (eclipse desktop) and other editor on windows.  We can make the behavior match the Mac and Linux editors. We just need to decide whether this is done for all platforms or just Mac and Linux. I leaning towards platform consistency.
Comment 4 Matt N. CLA 2013-04-24 19:21:48 EDT
(In reply to comment #3)
> I believe STR B is already the current behavior. If that is not the case for
> you, please add more details (which browser and OS?).

You're correct.  I assumed that if STR A didn't work, then STR B wouldn't either. (It doesn't work on Firefox's Scratchpad but I suspect that's because it uses an older version of Orion).
Comment 5 Silenio Quarti CLA 2013-04-29 11:49:13 EDT
Changed Mac and Linux behavior. Windows behavior is unchanged.

Fixed

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=a560e86192b7e04c0632f085686662b4275543af