Remove RootView.activeKeybindings method. It was dead code.

This commit is contained in:
Kevin Sawicki & Nathan Sobo
2013-02-21 16:23:16 -07:00
committed by probablycorey
parent 4a6f05ae4e
commit 58228f7ff7
2 changed files with 0 additions and 28 deletions

View File

@@ -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", ->

View File

@@ -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"