Use containsLocations() for AtomApplication window location

This commit is contained in:
Ash Wilson
2019-04-18 16:16:17 -04:00
parent 2a2ef17d85
commit a0be3e735f

View File

@@ -838,10 +838,12 @@ class AtomApplication extends EventEmitter {
})
}
// Returns the {AtomWindow} for the given paths.
windowForPaths (pathsToOpen, devMode) {
return this.getAllWindows().find(window =>
window.devMode === devMode && window.containsPaths(pathsToOpen)
// Returns the {AtomWindow} for the given locations.
windowForLocations (locationsToOpen, devMode, safeMode) {
return this.getLastFocusedWindow(window =>
window.devMode === devMode &&
window.safeMode === safeMode &&
window.containsLocations(locationsToOpen)
)
}