       from = from.translate([0, -1])
 
     pairInfo = @getPairInfo(from, @pair, enclosed)
+    # When range was same, try to expand range
     if pairInfo?.targetRange.isEqual(originalRange)
-      # When range was same, try to expand range
-      pairInfo = @getPairInfo(from: pairInfo.aRange.end, @pair, enclosed)
+      from = pairInfo.aRange.end.translate([0, +1])
+      pairInfo = @getPairInfo(from, @pair, enclosed)
     pairInfo?.targetRange
 
   selectTextObject: (selection) ->

    range = Range.fromPointWithDelta(point, 0, -1)
    @editor.getTextInBufferRange(range) is escapeChar

  findPair: (pair, options) ->
    {from, which, allowNextLine, enclosed} = options
    switch which


    @editor[scanFunc] pattern, scanRange, ({matchText, range, stop}) =>
      {start, end} = range
      return stop() if (not allowNextLine) and (from.row isnt start.row)
      return if @isEscapedCharAtPoint(start)

      pairState = @getPairState(pair, matchText, range)
      oppositeState = if pairState is 'open' then 'close' else 'open'
      if pairState is which
        openRange = state[oppositeState].pop()
      else
        state[pairState].push(range)

      if (pairState is which) and (state.open.length is 0) and (state.close.length is 0)
        if enclosed and openRange? and (which is 'close')
          return unless new Range(openRange.start, range.end).containsPoint(from)
        found = range
        return stop()
    found

  findOpen: (pair, options) ->
    options.which = 'open'
