1
1
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:
Tae Won Ha 2016-11-04 20:32:03 +01:00
commit 02898e2e98
No known key found for this signature in database
GPG Key ID: E40743465B5B8B44
4 changed files with 8 additions and 8 deletions

View File

@ -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):

View File

@ -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
}

View File

@ -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

View File

@ -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: