Reuse current window if it has no project path

Fixes #5615
This commit is contained in:
Max Brunsfeld
2015-02-18 10:29:48 -08:00
parent 2518c40942
commit 39a225821e
2 changed files with 16 additions and 1 deletions

View File

@@ -360,8 +360,13 @@ class AtomApplication
existingWindow = @windowForPaths(pathsToOpen, devMode)
# Default to using the specified window or the last focused window
currentWindow = window ? @lastFocusedWindow
if pathsToOpen.every((pathToOpen) -> fs.statSyncNoException(pathToOpen).isFile?())
existingWindow ?= window ? @lastFocusedWindow
existingWindow ?= currentWindow
unless currentWindow?.projectPaths?.length > 0
existingWindow ?= currentWindow
if existingWindow?
openedWindow = existingWindow