     focusedElement = document.activeElement
     restoreFocus = -> focusedElement?.focus()
 
-    @input.readInput().then (char) =>
+    @input.readInput().then (char) ->
       if target = targetByLabel[char.toLowerCase()]
         focusTarget(target)
       else
         restoreFocus()
-      removeLabelElemnts()
-    .catch =>
+      removeLabels()
+    .catch ->
       restoreFocus()
-      removeLabelElemnts()
+      removeLabels()

path = require 'path'
{CompositeDisposable} = require 'atom'

createLabelElement = (labelChar, className=null) ->
  element = document.createElement("div")
  element.classList.add("choose-pane")
  element.classList.add(className) if className
  element.textContent = labelChar
  element

removeLabelElemnts = ->
  for element in document.querySelectorAll("div.choose-pane")
    element.remove()


        when isFocused(target) then 'active'
        when target is lastFocusedTarget then 'last-focused'

      label = createLabel(labelChar, className)
      getView(target).appendChild(label)
      targetByLabel[labelChar.toLowerCase()] = target

    # Special label used for focus-last-focused
