From 58228f7ff7054c5346eeae91034cf989c5c44a15 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki & Nathan Sobo Date: Thu, 21 Feb 2013 16:23:16 -0700 Subject: [PATCH] Remove RootView.activeKeybindings method. It was dead code. --- spec/app/root-view-spec.coffee | 25 ------------------------- src/app/root-view.coffee | 3 --- 2 files changed, 28 deletions(-) diff --git a/spec/app/root-view-spec.coffee b/spec/app/root-view-spec.coffee index 8b1d6f691..e3b05e280 100644 --- a/spec/app/root-view-spec.coffee +++ b/spec/app/root-view-spec.coffee @@ -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", -> diff --git a/src/app/root-view.coffee b/src/app/root-view.coffee index 4fa03aefb..c462de3a0 100644 --- a/src/app/root-view.coffee +++ b/src/app/root-view.coffee @@ -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"