       " (No matches)"
     countElement.textContent = if showMatchText then countText else ""
 
-  copyToClipboard: (data) -> Utils.setTimeout 17, ->
+  copyToClipboard: (data) -> Utils.setTimeout TIME_TO_WAIT_FOR_IPC_MESSAGES, ->
     focusedElement = document.activeElement
     Clipboard.copy data
     focusedElement?.focus()
     window.parent.focus()
     UIComponentServer.postMessage {name: "unfocusIfFocused"}
 
-  pasteFromClipboard: -> Utils.setTimeout 17, ->
+  pasteFromClipboard: -> Utils.setTimeout TIME_TO_WAIT_FOR_IPC_MESSAGES, ->
     focusedElement = document.activeElement
     data = Clipboard.paste()
     focusedElement?.focus()

findMode = null

# Set the input element's text, and move the cursor to the end.
setTextInInputElement = (inputElement, text) ->

    countElement.id = "hud-match-count"
    countElement.style.float = "right"
    hud.appendChild countElement
    Utils.setTimeout TIME_TO_WAIT_FOR_IPC_MESSAGES, -> inputElement.focus()

    findMode =
      historyIndex: -1
