mirror of
https://github.com/atom/atom.git
synced 2026-01-24 22:38:20 -05:00
Require --add to open locations in existing windows
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user