diff --git a/spec/atom/window-spec.coffee b/spec/atom/window-spec.coffee index cf2d33503..bad4cc78d 100644 --- a/spec/atom/window-spec.coffee +++ b/spec/atom/window-spec.coffee @@ -13,28 +13,3 @@ describe "Window", -> spyOn(window.editor, 'save') window.keydown 'meta+s' expect(window.editor.save).toHaveBeenCalled() - - describe 'meta+o', -> - selectedFilePath = null - - beforeEach -> - spyOn(atom.native, 'openPanel').andCallFake -> - selectedFilePath - - it 'presents an open dialog', -> - window.keydown 'meta+o' - expect(atom.native.openPanel).toHaveBeenCalled() - - describe 'when a url is chosen', -> - it 'opens the url in the editor', -> - selectedFilePath = require.resolve 'fixtures/sample.txt' - spyOn(window.editor, 'open').andCallFake (url) -> url - window.keydown 'meta+o' - expect(window.editor.open).toHaveBeenCalledWith(selectedFilePath) - - describe 'when dialog is canceled', -> - it 'does not open the editor', -> - selectedFilePath = null - spyOn(window.editor, 'open').andCallFake() - window.keydown 'meta+o' - expect(window.editor.open).not.toHaveBeenCalled() diff --git a/src/atom/window.coffee b/src/atom/window.coffee index 596e0d1f6..1baa74c0b 100644 --- a/src/atom/window.coffee +++ b/src/atom/window.coffee @@ -26,10 +26,7 @@ windowAdditions = $(document).bind 'keydown', (event) => if String.fromCharCode(event.which) == 'S' and event.metaKey @editor.save() - - if String.fromCharCode(event.which) == 'O' and event.metaKey - url = atom.native.openPanel() - @editor.open(url) if url + false unbindKeys: -> $(document).unbind 'keydown'