       return row - 1
     lastRow
 
-  getRange: (startRow) ->
+  getRange: (selection) ->
+    @getRangeFromRow(selection.getBufferRange().start.row)
+
+  getRangeFromRow: (startRow) ->
     isBlank = @editor.isBufferRowBlank.bind(@editor)
     wasBlank = isBlank(startRow)
     fn = (row) -> isBlank(row) is wasBlank

{Range, Point} = require 'atom'
_ = require 'underscore-plus'

Base = require './base'
swrap = require './selection-wrapper'
globalState = require './global-state'

    [startRow, endRow] = selection.getBufferRowRange()

    if firstTime and not @isMode('visual', 'linewise')
      swrap(selection).setBufferRangeSafely @getRange(selection)
    else if not @instanceof('Indentation')
      point = if selection.isReversed()
        @getRangeFromRow(startRow - 1)?.start
      else
        @getRangeFromRow(endRow + 1)?.end
      selection.selectToBufferPosition point if point?

  selectTextObject: (selection) ->
