diff --git a/VimR/MainWindow.swift b/VimR/MainWindow.swift index c592888f..d45dd836 100644 --- a/VimR/MainWindow.swift +++ b/VimR/MainWindow.swift @@ -193,8 +193,19 @@ class MainWindow: NSObject, self.workspace.toggleAllTools() } + self.windowController.window?.delegate = self self.workspace.delegate = self + self.addViews() + + self.updateNeoVimAppearance() + self.neoVimView.delegate = self + + self.open(urls: state.urlsToOpen) + + self.window.setFrame(state.frame, display: true) + self.window.makeFirstResponder(self.neoVimView) + Observable .of(self.scrollDebouncer.observable, self.cursorDebouncer.observable) .merge() @@ -203,10 +214,6 @@ class MainWindow: NSObject, }) .disposed(by: self.disposeBag) - self.addViews() - - self.windowController.window?.delegate = self - source .observeOn(MainScheduler.instance) .subscribe( @@ -284,14 +291,6 @@ class MainWindow: NSObject, } }) .disposed(by: self.disposeBag) - - self.updateNeoVimAppearance() - self.neoVimView.delegate = self - - self.open(urls: state.urlsToOpen) - - self.window.setFrame(state.frame, display: true) - self.window.makeFirstResponder(self.neoVimView) } func uuidAction(for action: Action) -> UuidAction {