mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Fix exception when moving to the end of word when there *is* no word
This commit is contained in:
@@ -296,6 +296,12 @@ describe "EditSession", ->
|
||||
expect(cursor2.getBufferPosition()).toEqual [1, 13]
|
||||
expect(cursor3.getBufferPosition()).toEqual [3, 4]
|
||||
|
||||
it "does not blow up when there is no next word", ->
|
||||
editSession.setCursorBufferPosition [Infinity, Infinity]
|
||||
endPosition = editSession.getCursorBufferPosition()
|
||||
editSession.moveCursorToEndOfWord()
|
||||
expect(editSession.getCursorBufferPosition()).toEqual endPosition
|
||||
|
||||
describe "selection", ->
|
||||
selection = null
|
||||
|
||||
|
||||
Reference in New Issue
Block a user