From a8380a6df6b30d244d1969f56f4c3a021534780f Mon Sep 17 00:00:00 2001 From: Corey Johnson Date: Wed, 1 Feb 2012 16:49:46 -0800 Subject: [PATCH] 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? --- src/atom/vim-mode/motions.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/atom/vim-mode/motions.coffee b/src/atom/vim-mode/motions.coffee index d11aff2af..7f7a2575a 100644 --- a/src/atom/vim-mode/motions.coffee +++ b/src/atom/vim-mode/motions.coffee @@ -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 }