mirror of
https://github.com/atom/atom.git
synced 2026-01-25 14:59:03 -05:00
Use containsLocations() for AtomApplication window location
This commit is contained in:
@@ -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)
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user