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:
Nathan Sobo
2014-10-06 16:17:40 -06:00
parent a75faec64e
commit fb5d826d84

View File

@@ -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