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:
parent
ae606bb17c
commit
1f765f3b84
@ -1 +1 @@
|
||||
Subproject commit 043169d790b6886c9c3b3451b16f5712a9cd458c
|
||||
Subproject commit 6610eac13499ab239ffebeabf44b739dd9d0ca3e
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user