From 07a5672e2045bfdc924c3c99a84678e13811a8b2 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 17 Dec 2012 17:59:34 -0800 Subject: [PATCH] Use command() instead of on() for document events Allows commands such as 'open-user-configuration' to appear and be invoked from the event palette --- src/app/keymap.coffee | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/keymap.coffee b/src/app/keymap.coffee index f08e1e364..8bf11e54f 100644 --- a/src/app/keymap.coffee +++ b/src/app/keymap.coffee @@ -23,10 +23,10 @@ class Keymap 'meta-O': 'open-unstable' 'meta-w': 'core:close' - $(document).on 'new-window', => atom.newWindow() - $(document).on 'open-user-configuration', => atom.open(atom.configFilePath) - $(document).on 'open', => atom.open() - $(document).on 'open-unstable', => atom.openUnstable() + $(document).command 'new-window', => atom.newWindow() + $(document).command 'open-user-configuration', => atom.open(atom.configFilePath) + $(document).command 'open', => atom.open() + $(document).command 'open-unstable', => atom.openUnstable() bindKeys: (selector, bindings) -> bindingSet = new BindingSet(selector, bindings, @bindingSets.length)