mirror of
https://github.com/qvacua/vimr.git
synced 2024-12-26 15:25:14 +03:00
Handle --wait correctly when opening file
This commit is contained in:
parent
5080ff9d1f
commit
785e669621
@ -15,7 +15,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele
|
||||
enum Action {
|
||||
|
||||
case newMainWindow(urls: [URL], cwd: URL, nvimArgs: [String]?, cliPipePath: String?)
|
||||
case openInKeyWindow(urls: [URL], cwd: URL)
|
||||
case openInKeyWindow(urls: [URL], cwd: URL, cliPipePath: String?)
|
||||
|
||||
case preferences
|
||||
}
|
||||
@ -261,7 +261,7 @@ extension AppDelegate {
|
||||
self.emit(.newMainWindow(urls: urls, cwd: cwd, nvimArgs: nil, cliPipePath: pipePath))
|
||||
|
||||
case .open:
|
||||
self.emit(.openInKeyWindow(urls: urls, cwd: cwd))
|
||||
self.emit(.openInKeyWindow(urls: urls, cwd: cwd, cliPipePath: pipePath))
|
||||
|
||||
case .separateWindows:
|
||||
urls.forEach { self.emit(.newMainWindow(urls: [$0], cwd: cwd, nvimArgs: nil, cliPipePath: pipePath)) }
|
||||
|
@ -28,9 +28,9 @@ class AppDelegateReducer {
|
||||
|
||||
state.mainWindows[mainWindow.uuid] = mainWindow
|
||||
|
||||
case let .openInKeyWindow(urls, cwd):
|
||||
case let .openInKeyWindow(urls, cwd, cliPipePath):
|
||||
guard let uuid = state.currentMainWindowUuid, state.mainWindows[uuid] != nil else {
|
||||
let mainWindow = self.newMainWindow(with: state, urls: urls, cwd: cwd)
|
||||
let mainWindow = self.newMainWindow(with: state, urls: urls, cwd: cwd, cliPipePath: cliPipePath)
|
||||
state.mainWindows[mainWindow.uuid] = mainWindow
|
||||
break
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user