Skip to content
This repository has been archived by the owner on Apr 3, 2019. It is now read-only.

compare on toggle + refocus prev window #210

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion lib/git-control.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ views = []
view = undefined
pane = undefined
item = undefined
lastItem = undefined

module.exports = GitControl =

Expand All @@ -26,21 +27,28 @@ module.exports = GitControl =

toggleView: ->
console.log 'GitControl: toggle'
pane = atom.workspace.getActivePane()

unless view and view.active
lastItem = pane.getActiveItem()

view = new GitControlView()
views.push view

pane = atom.workspace.getActivePane()
item = pane.addItem view, 0

pane.activateItem item
view.compareMenuClick()

else
pane.destroyItem item
pane.activateItem lastItem
pane.activate()


return


updatePaths: ->
git.setProjectIndex(0)
return
Expand Down