1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-12-26 23:36:08 +03:00
This commit is contained in:
Tae Won Ha 2020-01-18 15:06:07 +01:00
parent f621f52204
commit eafdcf63b0
No known key found for this signature in database
GPG Key ID: E40743465B5B8B44

View File

@ -65,7 +65,6 @@ class OpenQuicklyWindow: NSObject,
private let log = OSLog(subsystem: Defs.loggerSubsystem,
category: Defs.LoggerCategory.uiComponents)
private var rootUrls: Set<URL> { Set(self.fileServicesPerRootUrl.map { url, _ in url }) }
private var window: NSWindow { self.windowController.window! }
private func configureWindow() {
@ -136,9 +135,10 @@ class OpenQuicklyWindow: NSObject,
private func updateRootUrls(state: AppState) {
let urlsToMonitor = Set(state.mainWindows.map { $1.cwd })
let currentUrls = Set(self.fileServicesPerRootUrl.map { url, _ in url })
let newUrls = urlsToMonitor.subtracting(self.rootUrls)
let obsoleteUrls = self.rootUrls.subtracting(urlsToMonitor)
let newUrls = urlsToMonitor.subtracting(currentUrls)
let obsoleteUrls = currentUrls.subtracting(urlsToMonitor)
newUrls.forEach { url in
self.log.info("Adding \(url) and its service.")