Don't restore state when --new-window is passed and other paths

This commit is contained in:
Ash Wilson
2019-04-18 17:09:55 -04:00
parent c0a39e04e2
commit c6652e1b29

View File

@@ -246,12 +246,12 @@ class AtomApplication extends EventEmitter {
if (options.test || options.benchmark || options.benchmarkTest) {
optionsForWindowsToOpen.push(options)
} else if (options.newWindow) {
shouldReopenPreviousWindows = false
} else if ((options.pathsToOpen && options.pathsToOpen.length > 0) ||
(options.urlsToOpen && options.urlsToOpen.length > 0)) {
optionsForWindowsToOpen.push(options)
shouldReopenPreviousWindows = this.config.get('core.restorePreviousWindowsOnStart') === 'always'
} else if (options.newWindow) {
shouldReopenPreviousWindows = false
} else {
shouldReopenPreviousWindows = this.config.get('core.restorePreviousWindowsOnStart') !== 'no'
}