Skip to content

Commit

Permalink
add support for escape to close timeplot. closes #28
Browse files Browse the repository at this point in the history
  • Loading branch information
littlebee committed May 10, 2018
1 parent f215edb commit 11da1b0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/git-time-machine.coffee
Expand Up @@ -6,6 +6,7 @@ module.exports = GitTimeMachine =
timelinePanel: null
subscriptions: null


activate: (state) ->
@gitTimeMachineView = new GitTimeMachineView state.gitTimeMachineViewState
@timelinePanel = atom.workspace.addBottomPanel(item: @gitTimeMachineView.getElement(), visible: false)
Expand All @@ -14,7 +15,10 @@ module.exports = GitTimeMachine =
@subscriptions = new CompositeDisposable

# Register command that toggles this view
@subscriptions.add atom.commands.add 'atom-workspace', 'git-time-machine:toggle': => @toggle()
@subscriptions.add atom.commands.add 'atom-workspace',
'git-time-machine:toggle': => @toggle()
'core:cancel': () => @timelinePanel?.isVisible() && @toggle()

@subscriptions.add atom.workspace.onDidChangeActivePaneItem((editor) => @_onDidChangeActivePaneItem(editor))


Expand Down

0 comments on commit 11da1b0

Please sign in to comment.