1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-12-29 00:34:26 +03:00
This commit is contained in:
Tae Won Ha 2020-01-18 16:33:42 +01:00
parent f0c329efc3
commit 02d6ef4ced
No known key found for this signature in database
GPG Key ID: E40743465B5B8B44

View File

@ -91,14 +91,15 @@ class OpenQuicklyWindow: NSObject,
private func subscription(_ state: StateType) {
self.updateRootUrls(state: state)
guard state.openQuickly.open,
let curWinState = state.currentMainWindow else {
guard state.openQuickly.open, let curWinState = state.currentMainWindow else {
self.windowController.close()
return
}
let windowIsOpen = self.window.isKeyWindow
// The window is open and the user changed the setting
if self.usesVcsIgnores != curWinState.usesVcsIgnores && self.window.isKeyWindow {
if self.usesVcsIgnores != curWinState.usesVcsIgnores && windowIsOpen {
self.usesVcsIgnores = curWinState.usesVcsIgnores
self.reset()
@ -107,12 +108,14 @@ class OpenQuicklyWindow: NSObject,
return
}
if self.window.isKeyWindow {
if windowIsOpen {
// already open, so do nothing
return
}
self.usesVcsIgnores = curWinState.usesVcsIgnores
// TODO: read global vcs ignores
self.prepareSearch(curWinState: curWinState)
self.windowController.showWindow(nil)
}