Skip to content

Commit

Permalink
Merge issue#7
Browse files Browse the repository at this point in the history
  • Loading branch information
Amitabh Das committed Dec 11, 2015
1 parent 4dee57f commit 90ab94f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/atom-cscope.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -186,13 +186,15 @@ module.exports = AtomCscope =

hide: ->
@modalPanel.hide()
atom.views.getView(@prevEditor).focus()
prevEditorView = atom.views.getView(@prevEditor)
prevEditorView.focus() if typeof prevEditorView != 'undefined'

toggle: ->
if @modalPanel.isVisible() then @hide() else @show()

switchPanes: ->
if @atomCscopeView.inputView.findEditor.hasFocus()
atom.views.getView(@prevEditor).focus()
prevEditorView = atom.views.getView(@prevEditor)
prevEditorView.focus() if typeof prevEditorView != 'undefined'
else
@atomCscopeView.inputView.findEditor.focus()

0 comments on commit 90ab94f

Please sign in to comment.