mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Remove RootView.activeKeybindings method. It was dead code.
This commit is contained in:
committed by
probablycorey
parent
4a6f05ae4e
commit
58228f7ff7
@@ -186,31 +186,6 @@ describe "RootView", ->
|
||||
rootView.trigger(event)
|
||||
expect(commandHandler).toHaveBeenCalled()
|
||||
|
||||
describe ".activeKeybindings()", ->
|
||||
originalKeymap = null
|
||||
keymap = null
|
||||
editor = null
|
||||
|
||||
beforeEach ->
|
||||
rootView.attachToDom()
|
||||
editor = rootView.getActiveEditor()
|
||||
keymap = new (require 'keymap')
|
||||
originalKeymap = window.keymap
|
||||
window.keymap = keymap
|
||||
|
||||
afterEach ->
|
||||
window.keymap = originalKeymap
|
||||
|
||||
it "returns all keybindings available for focused element", ->
|
||||
editor.on 'test-event-a', => # nothing
|
||||
|
||||
keymap.bindKeys ".editor",
|
||||
"meta-a": "test-event-a"
|
||||
"meta-b": "test-event-b"
|
||||
|
||||
keybindings = rootView.activeKeybindings()
|
||||
expect(Object.keys(keybindings).length).toBe 2
|
||||
expect(keybindings["meta-a"]).toEqual "test-event-a"
|
||||
|
||||
describe "when the path of the active editor changes", ->
|
||||
it "changes the title and emits an root-view:active-path-changed event", ->
|
||||
|
||||
@@ -124,9 +124,6 @@ class RootView extends View
|
||||
if not previousActiveEditor or editor.getPath() != previousActiveEditor.getPath()
|
||||
@trigger 'root-view:active-path-changed', editor.getPath()
|
||||
|
||||
activeKeybindings: ->
|
||||
keymap.bindingsForElement(document.activeElement)
|
||||
|
||||
getTitle: ->
|
||||
@title or "untitled"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user