Next word on at end of file moves cursor to end of file.

Not sure how this was working before? Maybe a quirk of ace?
This commit is contained in:
Corey Johnson
2012-02-01 16:49:46 -08:00
parent 0f75561a12
commit a8380a6df6

View File

@@ -48,8 +48,10 @@ class MoveToNextWord extends Motion
if match
column += match.index
else if row + 1 == @editor.buffer.numLines()
column = @editor.buffer.getLine(row).length
else
nextLineMatch = regex.exec(@editor.getLineText(++row))
nextLineMatch = regex.exec(@editor.buffer.getLine(++row))
column = nextLineMatch?.index or 0
{ row, column }