1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-12-27 15:53:31 +03:00

Add stub tabline handler

This commit is contained in:
Tae Won Ha 2020-12-06 10:29:31 +01:00
parent ae606bb17c
commit 1f765f3b84
No known key found for this signature in database
GPG Key ID: E40743465B5B8B44
3 changed files with 25 additions and 3 deletions

@ -1 +1 @@
Subproject commit 043169d790b6886c9c3b3451b16f5712a9cd458c
Subproject commit 6610eac13499ab239ffebeabf44b739dd9d0ca3e

View File

@ -475,6 +475,24 @@ extension NvimView {
}
}
}
final func event(_ value: MessagePackValue) {
guard let dict = value.dictionaryValue,
let event = dict.keys.first,
let args = dict[event]?.arrayValue else {
self.bridgeLogger.error("Could not convert \(value)")
return
}
switch event.stringValue {
case "tabline_update":
self.tablineUpdate(args)
case "win_viewport":
break
default:
break
}
}
final func setAttr(with value: MessagePackValue) {
guard let array = value.arrayValue else {
@ -570,6 +588,9 @@ extension NvimView {
}
extension NvimView {
private func tablineUpdate(_ args: [MessagePackValue]) {
Swift.print("!!!!!!!!!!!! \(args)")
}
private func bufferWritten(_ handle: Int) {
self

View File

@ -30,6 +30,7 @@ protocol UiBridgeConsumer: class {
func optionSet(_ value: MessagePackValue)
func setDirty(with value: MessagePackValue)
func rpcEventSubscribed()
func event(_ value: MessagePackValue)
func bridgeHasFatalError(_ value: MessagePackValue?)
func setAttr(with value: MessagePackValue)
func updateMenu()
@ -237,8 +238,8 @@ class UiBridge {
case .event:
guard let v = MessagePackUtils.value(from: data) else { return }
Swift.print("got event with \(v)")
self.consumer?.event(v)
case .debug1:
break