mirror of
https://github.com/qvacua/vimr.git
synced 2024-09-11 17:15:34 +03:00
Refactor slightly
This commit is contained in:
parent
6c7ce0fc77
commit
8dcd0cd1b3
@ -95,22 +95,17 @@ public extension NvimView {
|
||||
)
|
||||
|
||||
self.api.winGetCursor(window: RxNeovimApi.Window(0))
|
||||
.map {
|
||||
guard $0.count == 2
|
||||
else {
|
||||
self.log.error("Error decoding \($0)")
|
||||
return
|
||||
.flatMapCompletable { cursor in
|
||||
guard cursor.count == 2 else {
|
||||
self.log.error("Error decoding \(cursor)")
|
||||
return Completable.empty()
|
||||
}
|
||||
self.api.winSetCursor(
|
||||
return self.api.winSetCursor(
|
||||
window: RxNeovimApi.Window(0),
|
||||
pos: [$0[0] + vertSign * absDeltaY, $0[1] + horizSign * absDeltaX]
|
||||
pos: [cursor[0] + vertSign * absDeltaY, cursor[1] + horizSign * absDeltaX]
|
||||
)
|
||||
.subscribe(onError: { [weak self] error in
|
||||
self?.log.error("Error in \(#function): \(error)")
|
||||
})
|
||||
.disposed(by: self.disposeBag)
|
||||
}
|
||||
.subscribe(onFailure: { [weak self] error in
|
||||
.subscribe(onError: { [weak self] error in
|
||||
self?.log.error("Error in \(#function): \(error)")
|
||||
})
|
||||
.disposed(by: self.disposeBag)
|
||||
|
@ -331,7 +331,6 @@ public final class NvimView: NSView, NSUserInterfaceValidations, NSTextInputClie
|
||||
|
||||
let sourceFileUrls: [URL]
|
||||
|
||||
let rpcEventSubscriptionCondition = ConditionVariable()
|
||||
let nvimExitedCondition = ConditionVariable()
|
||||
|
||||
var tabEntries = [TabEntry]()
|
||||
|
Loading…
Reference in New Issue
Block a user