   @extend()
   complete: true
 
-  isWholeLine: ({start, end}) ->
-    (start.column is 0) and (end.column is 0) and start < end
+  isLinewiseRange: (range) ->
+    (range.start.column is 0) and (range.end.column is 0) and (not range.isEmpty())
 
   rangeToBeginningOfFile: (point) ->
     new Range(Point.ZERO, point)

    range

  select: ->
    @eachSelection (selection) =>
      if range = @getRange(selection, @pair)
        selection.setBufferRange(range)

class AnyPair extends Pair
  @extend()
  pairs: ['""', "''", "``", "{}", "<>", "><", "[]", "()"]

  select: ->
    @eachSelection (selection) =>
      ranges = []
      for pair in @pairs when (range = @getRange(selection, pair))
        ranges.push range
      unless _.isEmpty(ranges)
        ranges = ranges.sort (a, b) -> a.compare(b)
        selection.setBufferRange(_.last(ranges))

class DoubleQuote extends Pair
  @extend()

  @extend()
  select: ->
    @editor.selectAll()
    @isIncludeNonEmptySelection()

module.exports = {
  Word, WholeWord,
