Use closure wrapper with current event name

This commit is contained in:
Kevin Sawicki
2012-10-04 11:07:46 -07:00
parent 863f9f36fb
commit ceb496e202
2 changed files with 7 additions and 1 deletions

View File

@@ -18,7 +18,9 @@ class EditorCommand
return unless keymaps
for key, event of keymaps
editor.on event, => @execute(editor, event)
do (event) =>
editor.on event, =>
@execute(editor, event)
@replaceSelectedText: (editor, replace) ->
selection = editor.getSelection()