+8
Editor range selections/caret positioning behaves differently than the rest of OS X's text views do
Sublime Text 2 handles text range selections and caret position changes slightly differently than the native OS X text views do.
Test Case #1: Open a blank file with a single line with the contents "one two three"
- Highlight the word "two" and press the left arrow key while holding shift
- Expected OS X behavior: Expand the text selection to the left of "two" by one, resulting in the selected range being " two"
- Sublime behavior: Decreases the selection from the right by one, resulting in the selected range being "tw"
- Note: This is not the case for shift+right, this works as expected.
- Put the caret in the middle of the line, press the up arrow key
- Expected behavior: The caret moves to the beginning of the line
- Sublime behavior: Nothing happens
- Put the caret in the middle of the line, press the down arrow key
- Expected behavior: The caret moves to the end of the line
- Sublime behavior: Nothing happens
- Highlight "two", press the up arrow key
- Expected behavior: The caret moves to the beginning of the line
- Sublime behavior: Caret moves to the beginning of the word "two"
- Highlight the word "two", press the down arrow key
- Expected Behavior: The caret moves to the end of the line
- Sublime behavior: The caret moves to the end of the word "two"
- Highlight the word "two", press the up arrow key while holding shift
- Expected Behavior: It highlights the entire line up until the end of "two" resulting in "one two" being highlighted
- Sublime behavior: It highlights the entire line up unto the beginning of "two" resulting in "one " being highlighted
- Note: This is not the case for shift+down, it works as expected.
- Highlight the word "two" in the second add line, press the up arrow key while holding shift
- Expected behavior: It moves extends the range to select everything from the beginning of two on the first line, to the end of two on the second line, resulting in the selection being "two three\none two"
- Sublime behavior: It changes the range to selection everything between "two" on the first line and "two" on the second line, resulting in the selection being " three\none "
- Note: This is not the case with shift+down while starting on the first line, this works as expected.
- TextEdit
- TextMate
- Xcode
- Espresso 2
- Chocolat
Служба підтримки клієнтів працює на UserEcho
Great test case write-up. This has been bugging me to no end.