Save and restore spec window dimensions

Closes #597
This commit is contained in:
Kevin Sawicki
2013-06-26 14:21:01 -07:00
committed by Nathan Sobo
parent d55c09c9d3
commit 8561bb34a8
2 changed files with 7 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
require 'window'
window.setUpEnvironment()
window.setDimensions(height: 800, width: 600)
window.setUpEnvironment('spec')
window.restoreDimensions()
nakedLoad 'jasmine-jquery'
$ = jQuery = require 'jquery'
@@ -25,6 +25,9 @@ keymap.loadBundledKeymaps()
[bindingSetsToRestore, bindingSetsByFirstKeystrokeToRestore] = []
$(window).on 'core:close', -> window.close()
$(window).on 'unload', ->
atom.windowMode = 'spec'
atom.saveWindowState()
$('html,body').css('overflow', 'auto')
jasmine.getEnv().addEqualityTester(_.isEqual) # Use underscore's definition of equality for toEqual assertions

View File

@@ -236,8 +236,8 @@ window.atom =
getWindowStatePath: ->
switch @windowMode
when 'config'
filename = 'config'
when 'config', 'spec'
filename = @windowMode
when 'editor'
{initialPath} = @getLoadSettings()
if initialPath