 
   resize: ->
     promiseNextTick.then() =>
-      if @visible then @show(0) else @hide(0)
+      if @visible then @show 0  else @hide 0
     .catch error
 
   storeFocusedElement: ->

    {pushEditor} = @conf

    # wait until the tree view package is activated
    atom.packages.activatePackage('tree-view').then (treeViewPkg) =>
      @registerTreeView treeViewPkg
      @handleEvents()
      # start with pushEditor = true, we'll change it back later

      'autohide-tree-view:toggle': => @toggle()

    # add listeners for mouse events
    mouseEventDisposables = null
    @disposables.add atom.config.observe 'autohide-tree-view.showOn', (value) =>
      mouseEventDisposables?.dispose()
      @disposables.add mouseEventDisposables = new SubAtom()
      if value.match 'hover'
        mouseEventDisposables.add 'atom-workspace', 'mouseenter', '.tree-view-resizer.autohide-hover', => @show()
        mouseEventDisposables.add 'atom-workspace', 'mouseleave', '.tree-view-resizer.autohide-hover', => @hide()
      if value.match 'click'
        mouseEventDisposables.add 'atom-workspace', 'click', '.tree-view-resizer', (event) => @toggle value is 'click'
        mouseEventDisposables.add '.tree-view', 'blur', =>
          @clearFocusedElement()
          @hide 0

    # disable the tree view from showing during a selection
    @disposables.add 'atom-text-editor', 'mousedown', => @disableHoverEvents()
