       pairInfo = @getPairInfo(from: pairInfo.aRange.end, @pair, enclosed)
     pairInfo?.targetRange
 
-  select: ->
-    @eachSelection (s) =>
-      swrap(s).setBufferRangeSafely @getRange(s, {@enclosed})
+  selectTextObject: (selection) ->
+    swrap(selection).setBufferRangeSafely @getRange(selection, {@enclosed})
 
 # -------------------------
 class AnyPair extends Pair

  isLinewise: ->
    swrap.detectVisualModeSubmode(@editor) is 'linewise'

  eachSelection: (fn) ->
    for s in @editor.getSelections()
      fn(s)
      {start, end} = s.getBufferRange()
      if swrap(s).detectVisualModeSubmode() is 'characterwise' and end.column is 0
        end = getEolBufferPositionForRow(@editor, end.row - 1)
        swrap(s).setBufferRangeSafely([start, end])
    @emitDidSelect()

# -------------------------
# [FIXME] Need to be extendable.
class Word extends TextObject
  @extend(false)
  select: ->
    @eachSelection (selection) =>
      wordRegex = @wordRegExp ? selection.cursor.wordRegExp()
      @selectInner(selection, wordRegex)
      @selectA(selection) if @isA()

  selectInner: (selection, wordRegex=null) ->
    selection.selectWord()

    ranges = @getRanges(selection)
    _.last(sortRanges(ranges)) if ranges.length

  selectTextObject: (selection) ->
    swrap(selection).setBufferRangeSafely @getNearestRange(selection)

class AAnyPair extends AnyPair
  @extend()
