   # 'callback' is invoked (if it is provided).
   deactivateMode: (delay, callback) ->
     deactivate = =>
-      @markerMatcher?.deactivate?()
       DomUtils.removeElement @hintMarkerContainingDiv if @hintMarkerContainingDiv
       @hintMarkerContainingDiv = null
+      @markerMatcher = null
       @isActive = false
       @hintMode?.exit()
       @hintMode = null

  #
  showMarker: (linkMarker, matchingCharCount) ->
    linkMarker.style.display = ""
    # TODO(philc):
    for j in [0...linkMarker.childNodes.length]
      if (j < matchingCharCount)
        linkMarker.childNodes[j].classList.add("matchingCharacter")

      @renderMarker linkMarker
      linkMarker

#
# Make each hint character a span, so that we can highlight the typed characters as you type them.
#
