     (range for klass in @member when (range = @getRangeBy(klass, selection)))
 
   getRange: (selection) ->
-    ranges = @getRanges(selection)
-    _.last(sortRanges(ranges)) if ranges.length
-
-class InnerNonEmptySmartWordOrInnerParenthesis extends SomeTextObject
+    for member in @member when range = @getRangeBy(member, selection)
+      return range
+
+class InnerAnyPairOrInnerSmartWord extends TextObjectFirstFound
   @extend()
   member: [
-    "InnerNonEmptySmartWord"
-    "InnerParenthesis"
+    "InnerAnyPair"
+    "InnerSmartWord"
   ]

class AnyPair extends Pair
  @extend(false)
  allowForwarding: false
  skipEmptyPair: false
  member: [
    'DoubleQuote', 'SingleQuote', 'BackTick',

  ]

  getRangeBy: (klass, selection) ->
    options = {@inner, @skipEmptyPair}
    options.allowNextLine = @allowNextLine if @allowNextLine?
    @new(klass, options).getRange(selection, {@allowForwarding, @searchFrom})

  getRanges: (selection) ->
    (range for klass in @member when (range = @getRangeBy(klass, selection)))
