diff --git a/src/editor-component.coffee b/src/editor-component.coffee index 2038f5787..3345cee19 100644 --- a/src/editor-component.coffee +++ b/src/editor-component.coffee @@ -510,8 +510,14 @@ EditorComponent = React.createClass addCommandListeners: (listenersByCommandName) -> {parentView} = @props - for command, listener of listenersByCommandName - parentView.command command, listener + addListener = (command, listener) -> + parentView.command command, (event) -> + event.stopPropagation() + listener(event) + + addListener(command, listener) for command, listener of listenersByCommandName + + return observeConfig: -> @subscribe atom.config.observe 'editor.showIndentGuide', @setShowIndentGuide