 
     if found
       point = wordRange.start
-      if pointIsAtEndOfLineAtNonEmptyRow(@editor, point) and not point.isEqual(scanRange.end)
+      if pointIsAtEndOfLineAtNonEmptyRow(@editor, point) and not point.isEqual(vimEOF)
         point.traverse([1, 0])
       else
         point

# -------------------------
class MoveToNextWholeWord extends MoveToNextWord
  @extend()
  wordRegex: /^\s*?$|\S+/g

class MoveToPreviousWholeWord extends MoveToPreviousWord
  @extend()
  wordRegex: /^\s*$|\S+/

class MoveToEndOfWholeWord extends MoveToEndOfWord
  @extend()

  getPoint: (pattern, from) ->
    wordRange = null
    found = false
    vimEOF = @getVimEofBufferPosition(@editor)

    @scanForward pattern, {from}, ({range, matchText, stop}) ->
      wordRange = range
