   setPatternForPair: (pair) ->
     @pattern = ///(#{_.escapeRegExp(pair[0])})///g
 
-  getPairState: (editor, {matchText, range}) ->
+  getPairState: ({matchText, range}) ->
     matchText = _.escapeRegExp(matchText)
     backslash = _.escapeRegExp('\\')
     patterns = [

        scanRange = new Range([0, 0], from)
        scanFunctionName = 'backwardsScanInBufferRange'

    stack = []
    range = null
    @editor[scanFunctionName] @pattern, scanRange, (event) =>
      if not @allowNextLine and (from.row isnt event.range.start.row)
        event.stop()
        return

      if @filters.some((filter) -> filter(event))
        return

      if @getPairState(@editor, event) isnt which
        stack.push(event)
      else
        topEvent = stack.pop()

      "[^#{backslash}]?#{matchText}"
    ]
    pattern = new RegExp(patterns.join('|'))
    lineText = getLineTextToBufferPosition(@editor, range.end)
    charCount = countChar(lineText, pattern)
    if charCount % 2 is 0
      'close'
