mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Force native event handler to be registered for activation commands
We use onWillDispatch internally to manage activation commands, activating packages *before* the activation command starts dispatching. This means we need to explicitly tell the command registry to subscribe to the command in question.
This commit is contained in:
@@ -335,6 +335,7 @@ class Package
|
||||
for selector, commands of @getActivationCommands()
|
||||
for command in commands
|
||||
do (selector, command) =>
|
||||
atom.commands.commandRegistered(command)
|
||||
@activationCommandSubscriptions.add(atom.commands.onWillDispatch (event) =>
|
||||
return unless event.type is command
|
||||
currentTarget = event.target
|
||||
|
||||
Reference in New Issue
Block a user