Save window parameters on reload

This commit is contained in:
Kevin Sawicki
2013-06-08 17:22:21 -07:00
parent b89eb07c6e
commit cea521a737

View File

@@ -19,6 +19,9 @@ window.atom =
setPathToOpen: (pathToOpen) ->
window.location.params.pathToOpen = pathToOpen
@saveWindowParameters()
saveWindowParameters: ->
hashSegments = []
for name, value of window.location.params
hashSegments.push("#{encodeURIComponent(name)}=#{encodeURIComponent(value)}")
@@ -208,6 +211,7 @@ window.atom =
remote.getCurrentWindow().toggleDevTools()
reload: ->
@saveWindowParameters()
remote.getCurrentWindow().restart()
focus: ->