mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Calling .abortKeyBinding on an event that wasn't triggered by the keymap is ok
Certain events call `abortKeyBinding` to opt out of handling certain keybindings. Snippets does this with tab for example. If it's not a situation where it's appropriate to go to the next tab stop, we let the next binding be triggered, which could insert a tab, for example. But when we trigger events from the event palette, there *is* no next binding. Having a no-op function helps in this situation.
This commit is contained in:
@@ -72,3 +72,5 @@ $.fn.command = (args...) ->
|
||||
documentation[eventName] = _.humanizeEventName(eventName)
|
||||
@document(documentation)
|
||||
@on(args...)
|
||||
|
||||
$.Event.prototype.abortKeyBinding = ->
|
||||
|
||||
Reference in New Issue
Block a user