Merge pull request #3244 from atom/bo-stop-propagation

Stop propagation on all commands in the editor
This commit is contained in:
Ben Ogle
2014-08-12 17:08:22 -07:00

View File

@@ -511,8 +511,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