Require --add to open locations in existing windows

This commit is contained in:
Ash Wilson
2019-01-04 11:06:17 -05:00
parent d725f5e42b
commit d3671f7055

View File

@@ -846,9 +846,9 @@ class AtomApplication extends EventEmitter {
const normalizedPathsToOpen = locationsToOpen.map(location => location.pathToOpen).filter(Boolean)
let existingWindow
if (!newWindow && normalizedPathsToOpen.length > 0) {
if (addToLastWindow && normalizedPathsToOpen.length > 0) {
existingWindow = this.windowForPaths(normalizedPathsToOpen, devMode)
if (!existingWindow && addToLastWindow) {
if (!existingWindow) {
let lastWindow = window || this.getLastFocusedWindow()
if (lastWindow && lastWindow.devMode === devMode) {
existingWindow = lastWindow