Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Ctrl+right arrow skips too many tokens #670

Closed
peterflynn opened this issue Apr 17, 2012 · 4 comments
Closed

Ctrl+right arrow skips too many tokens #670

peterflynn opened this issue Apr 17, 2012 · 4 comments

Comments

@peterflynn
Copy link
Member

Start with this JS in Brackets:

function fn1() {
    myFunc("foo",bar);
}
obj.blah();
  1. Put the cursor at the beginning of the text
  2. Press ctrl+right arrow (or Mac, alt+right arrow) a few times

Result:
Sequence is: end of "myFunc" (before opening paren), end of "foo" (but before closing quote), end of "bar" (before closing paren)... and then skips to the end of "obj" (before the dot) on the next line

Expected:
In Sublime, the sequence is: end of "myFunc", start of "foo" (after opening quote), end of "foo", start of "bar" (after comma), end of "bar", end of line (after semicolon), start of next line (before curly brace), end of line (after curly brace), start of "obj", end of "obj" (before dot).

IntelliJ is the same.

Eclipse is the same (although by default it will also stop in the middle of "myFunc" due to the camelcasing).

@peterflynn
Copy link
Member Author

Similar to #627, this isn't a huge glaring bug, but it makes navigating around via keyboard feel just subtly flaky in a hard-to-place way.

@njx
Copy link
Contributor

njx commented Apr 24, 2012

QRB marking "to user story" for keyboard shortcut story.

@pthiess
Copy link
Contributor

pthiess commented May 10, 2012

Moved to Trello - Card 272

@peterflynn
Copy link
Member Author

This was fixed in CodeMirror recently: codemirror/codemirror5@047e0f5.

See discussion thread for details: https://groups.google.com/d/msg/codemirror/WOoqlDuIbaY/1u4ugOukHOIJ.

The behavior is not quite as described above: in cases where a line contains only one word (or no word: blank, all whitespace, all non-word chars, etc.) it doesn't match Sublime and other editors. But it is much improved.

gideonthomas pushed a commit to gideonthomas/brackets that referenced this issue Apr 13, 2017
Fix adobe#1907: menus don't have a dark theme anymore
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants