mirror of
https://github.com/atom/atom.git
synced 2026-02-07 05:05:02 -05:00
Add rootView.activeKeybindings().
This will return all active keybindings available for the focused element.
This commit is contained in:
@@ -32,7 +32,6 @@ class Keymap
|
||||
|
||||
while currentNode.length
|
||||
bindingSets = @bindingSets.filter (set) -> currentNode.is(set.selector)
|
||||
console.log @bindingSets, currentNode
|
||||
|
||||
bindingSets.sort (a, b) -> b.specificity - a.specificity
|
||||
for bindingSet in bindingSets
|
||||
|
||||
@@ -114,6 +114,9 @@ class RootView extends View
|
||||
if not previousActiveEditor or editor.buffer.path != previousActiveEditor.buffer.path
|
||||
@trigger 'active-editor-path-change', editor.buffer.path
|
||||
|
||||
activeKeybindings: ->
|
||||
keymap.bindingsForElement(document.activeElement)
|
||||
|
||||
setTitle: (title='untitled') ->
|
||||
document.title = title
|
||||
|
||||
|
||||
Reference in New Issue
Block a user