mirror of
https://github.com/atom/atom.git
synced 2026-01-22 21:38:10 -05:00
Add dummy commands prior to package activation so they appear in palette
Fixes #3846
This commit is contained in:
@@ -338,7 +338,9 @@ class Package
|
||||
for selector, commands of @getActivationCommands()
|
||||
for command in commands
|
||||
do (selector, command) =>
|
||||
atom.commands.commandRegistered(command)
|
||||
# Add dummy command so it appears in menu.
|
||||
# The real command will be registered on package activation
|
||||
@activationCommandSubscriptions.add atom.commands.add selector, command, ->
|
||||
@activationCommandSubscriptions.add(atom.commands.onWillDispatch (event) =>
|
||||
return unless event.type is command
|
||||
currentTarget = event.target
|
||||
|
||||
Reference in New Issue
Block a user