mirror of
https://github.com/atom/atom.git
synced 2026-01-23 22:08:08 -05:00
Clone keyBindings by default
This commit is contained in:
@@ -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', ->
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user