Clone keyBindings by default

This commit is contained in:
probablycorey
2013-11-15 11:54:09 -08:00
parent b9902cb6f2
commit 809a02ca10
2 changed files with 2 additions and 2 deletions

View File

@@ -23,7 +23,7 @@ atom.themes.requireStylesheet '../static/jasmine'
fixturePackagesPath = path.resolve(__dirname, './fixtures/packages')
atom.packages.packageDirPaths.unshift(fixturePackagesPath)
atom.keymap.loadBundledKeymaps()
keyBindingsToRestore = _.clone(atom.keymap.allBindings())
keyBindingsToRestore = atom.keymap.allBindings()
$(window).on 'core:close', -> window.close()
$(window).on 'unload', ->

View File

@@ -93,7 +93,7 @@ class Keymap
# object contains the following keys `source`, `selector`, `command`,
# `keystroke`, `index`, `specificity`.
allBindings: ->
@keyBindings
_.clone(@keyBindings)
bindingsForKeystrokeMatchingElement: (keystroke, element) ->
keyBindings = @bindingsForKeystroke(keystroke)