mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Favor the most recent matching binding when selecting app menu shortcuts
We sending every binding matching the `body` selector to the browser process, but it only selects the first. Since we scan the bindings in chronological order, we need to unshift bindings to the front of the array so the most recently defined bindings are loaded first.
This commit is contained in:
@@ -77,7 +77,7 @@ class MenuManager
|
||||
keystrokesByCommand = {}
|
||||
for binding in atom.keymap.getKeyBindings() when @includeSelector(binding.selector)
|
||||
keystrokesByCommand[binding.command] ?= []
|
||||
keystrokesByCommand[binding.command].push binding.keystroke
|
||||
keystrokesByCommand[binding.command].unshift binding.keystroke
|
||||
@sendToBrowserProcess(@template, keystrokesByCommand)
|
||||
|
||||
loadPlatformItems: ->
|
||||
|
||||
Reference in New Issue
Block a user