Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 368845 - Arrow key should cancel linked mode
Summary: Arrow key should cancel linked mode
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Client (show other bugs)
Version: 0.4   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 1.0 M2   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2012-01-17 11:30 EST by Mark Macdonald CLA
Modified: 2012-09-24 09:48 EDT (History)
4 users (show)

See Also:
john.arthorne: review?


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Macdonald CLA 2012-01-17 11:30:55 EST
1. Create a new Javascript file; open it.
2. Type 'fo' then press Ctrl+Space to open content assist.
3. Choose the "for - iterate over array" template proposal.
   (This will insert the skeleton of a for-loop and enter linked mode.)
4. Press the arrow key to move the editing caret inside the for-loop.
5. Start typing. I expected linked mode to be cancelled, but it's not, so I end up overwriting "i" with the body of the for loop.
Comment 1 Andrew Clement CLA 2012-01-26 14:07:48 EST
I fixed the problem I could see here (on pressing down arrow the link mode isn't cancelled).
 
git repo: git://github.com/aclement/orion.client.git
branch: bug368845
commit id: b480e19e21ac2960f1f32086f0bdcd4d409b49ab
full link:
https://github.com/aclement/orion.client/commit/b480e19e21ac2960f1f32086f0bdcd4d409b49ab

I wrote all this code and have the rights to contribute it to Eclipse under the eclipse.org web site terms of use.
Comment 2 Andrew Clement CLA 2012-01-26 16:51:18 EST
Sorry to do this, but this additional commit (applied on top of the previous one) also fixes the UP arrow case when trying to escape out of linked mode:

git repo: git://github.com/aclement/orion.client.git
branch: bug368845
commit id: 4c1bbb9104a1df512a1c5afd5dcd7b2f31817572
full link:
https://github.com/aclement/orion.client/commit/4c1bbb9104a1df512a1c5afd5dcd7b2f31817572


I wrote all this code and have the rights to contribute it to Eclipse under the
eclipse.org web site terms of use.
Comment 3 Patrick Naish CLA 2012-08-20 07:06:55 EDT
This is currently throwing exceptions for me (in 0.5).

On down arrow:
Uncaught TypeError: Object #<Object> has no method 'lineDown' editor.js:559

On up arrow:
Uncaught TypeError: Object #<Object> has no method 'lineUp' editor.js:551
Comment 4 Andrew Eisenberg CLA 2012-09-19 18:10:26 EDT
This bug has always bothered me.  I just pushed a fix.  I didn't know that Andy already had a partial fix for this.  Mine is similar and does not appear to throw any exceptions.

Here is a link to the fix:

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