mirror of
https://github.com/qvacua/vimr.git
synced 2024-11-28 11:35:35 +03:00
Merge branch 'issue/322-gcommit-crash'
This commit is contained in:
commit
02898e2e98
@ -60,6 +60,7 @@ class FileBrowserComponent: ViewComponent {
|
||||
self.fileItemService.sink
|
||||
.filter { $0 is FileItemServiceChange }
|
||||
.map { $0 as! FileItemServiceChange }
|
||||
.observeOn(MainScheduler.instance)
|
||||
.subscribe(onNext: { [unowned self] action in
|
||||
switch action {
|
||||
case let .childrenChanged(root, fileItem):
|
||||
@ -69,9 +70,7 @@ class FileBrowserComponent: ViewComponent {
|
||||
|
||||
// FIXME: restore expanded states
|
||||
if fileItem?.url == self.cwd {
|
||||
DispatchUtils.gui {
|
||||
self.fileView.reloadItem(nil, reloadChildren: true)
|
||||
}
|
||||
self.fileView.reloadItem(nil, reloadChildren: true)
|
||||
}
|
||||
|
||||
guard self.fileView.row(forItem: fileItem) > -1 else {
|
||||
@ -79,9 +78,7 @@ class FileBrowserComponent: ViewComponent {
|
||||
}
|
||||
|
||||
// FIXME: restore expanded states
|
||||
DispatchUtils.gui {
|
||||
self.fileView.reloadItem(fileItem, reloadChildren: true)
|
||||
}
|
||||
self.fileView.reloadItem(fileItem, reloadChildren: true)
|
||||
}
|
||||
})
|
||||
.addDisposableTo(self.disposeBag)
|
||||
@ -104,6 +101,7 @@ class FileBrowserComponent: ViewComponent {
|
||||
return source
|
||||
.filter { $0 is MainWindowAction }
|
||||
.map { $0 as! MainWindowAction }
|
||||
.observeOn(MainScheduler.instance)
|
||||
.subscribe(onNext: { [unowned self] action in
|
||||
switch action {
|
||||
case let .changeCwd(mainWindow: mainWindow):
|
||||
|
@ -34,9 +34,9 @@ extension URL {
|
||||
|
||||
do {
|
||||
try (self as NSURL).getResourceValue(&rsrc, forKey: URLResourceKey(rawValue: key))
|
||||
} catch {
|
||||
} catch let error as NSError {
|
||||
// FIXME error handling
|
||||
print("\(#function): \(self) -> ERROR while getting \(key)")
|
||||
print("\(#function): \(self) -> ERROR while getting \(key): \(error)")
|
||||
return false
|
||||
}
|
||||
|
||||
|
@ -181,6 +181,7 @@ class MainWindowComponent: WindowComponent, NSWindowDelegate, NSUserInterfaceVal
|
||||
|| appearanceData.editorUsesLigatures != self.neoVimView.usesLigatures
|
||||
|| appearanceData.editorLinespacing != self.neoVimView.linespacing
|
||||
}
|
||||
.observeOn(MainScheduler.instance)
|
||||
.subscribe(onNext: { [unowned self] appearance in
|
||||
self.neoVimView.usesLigatures = appearance.editorUsesLigatures
|
||||
self.neoVimView.font = appearance.editorFont
|
||||
|
@ -142,6 +142,7 @@ class OpenQuicklyWindowComponent: WindowComponent,
|
||||
self.mainWindow?.sink
|
||||
.filter { $0 is MainWindowAction }
|
||||
.map { $0 as! MainWindowAction }
|
||||
.observeOn(MainScheduler.instance)
|
||||
.subscribe(onNext: { [unowned self] action in
|
||||
switch action {
|
||||
case .close:
|
||||
|
Loading…
Reference in New Issue
Block a user