   getFirstCharacterBufferPositionForScreenRow
   getTextInScreenRange
   cursorIsAtEndOfLineAtNonEmptyRow
-  buildWordPatternByCursor
-  getNonWordCharactersForCursor
   getFirstCharacterColumForBufferRow
 
   debug

  getPreviousStartOfSentence: (fromPoint) ->
    scanRange = [fromPoint, [0, 0]]
    foundPoint = null
    @editor.backwardsScanInBufferRange @sentenceRegex, scanRange, ({range, match, stop, matchText}) ->
      if range.end.isLessThan(fromPoint)
        foundPoint = range.end
        stop()
    foundPoint

  getPoint: (fromPoint) ->
    foundPoint = @getPreviousStartOfSentence(fromPoint)

    isBlank = (isAtNonBlankRow) -> not isAtNonBlankRow
    if boundaryRow = @getParagraphBoundaryRow(fromPoint.row, 'previous', isBlank)
      point = @getFirstCharacterPositionForRow(boundaryRow + 1)
      if point.isLessThan(fromPoint)
        paragraphBoundaryPoint = point
      else
        paragraphBoundaryPoint = @getFirstCharacterPositionForRow(boundaryRow)
    paragraphBoundaryPoint ?= [0, 0]

    if foundPoint?
      Point.max(foundPoint, paragraphBoundaryPoint)
    else
      paragraphBoundaryPoint

# Paragraph
# -------------------------

  getFirstCharacterPositionForRow: (row) ->
    new Point(row, getFirstCharacterColumForBufferRow(@editor, row))

  isBlankRow: (row) ->
    @editor.isBufferRowBlank(row)

  getNextStartOfSentence: (fromPoint) ->
    scanRange = new Range(fromPoint, @getVimEofBufferPosition())
    foundPoint = null
    @editor.scanInBufferRange @sentenceRegex, scanRange, ({range, matchText, match, stop}) =>
      if match[1]?
        if @isBlankRow(range.start.row) isnt @isBlankRow(range.end.row)
          foundPoint = @getFirstCharacterPositionForRow(range.end.row)
      else
        foundPoint = range.end
      stop() if foundPoint?
    foundPoint ? scanRange.end

  getPoint: (fromPoint) ->
    @getNextStartOfSentence(fromPoint)

class MoveToPreviousSentence extends MoveToNextSentence
  @extend()
