mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Close window on meta-W
This commit is contained in:
@@ -11,11 +11,16 @@ describe "Window", ->
|
||||
$(window).off 'beforeunload'
|
||||
|
||||
describe ".close()", ->
|
||||
it "is triggered by the 'close' event", ->
|
||||
it "is triggered by the 'core:close' event", ->
|
||||
spyOn window, 'close'
|
||||
$(window).trigger 'core:close'
|
||||
expect(window.close).toHaveBeenCalled()
|
||||
|
||||
it "is triggered by the 'window:close event'", ->
|
||||
spyOn window, 'close'
|
||||
$(window).trigger 'window:close'
|
||||
expect(window.close).toHaveBeenCalled()
|
||||
|
||||
describe ".reload()", ->
|
||||
it "returns false when no buffers are modified", ->
|
||||
spyOn($native, "reload")
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
'pagedown': 'core:page-down'
|
||||
|
||||
'meta-S': 'window:save-all'
|
||||
'meta-W': 'window:close'
|
||||
'meta-+': 'window:increase-font-size'
|
||||
'meta--': 'window:decrease-font-size'
|
||||
'ctrl-w w': 'window:focus-next-pane'
|
||||
|
||||
@@ -29,6 +29,7 @@ windowAdditions =
|
||||
@pasteboard = new Pasteboard
|
||||
|
||||
$(window).on 'core:close', => @close()
|
||||
$(window).command 'window:close', => @close()
|
||||
|
||||
# This method is intended only to be run when starting a normal application
|
||||
# Note: RootView assigns itself on window on initialization so that
|
||||
|
||||
Reference in New Issue
Block a user