ui: make the reference list argument to Ops.Write variadic

Makes the code nicer.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-06-03 14:07:56 +02:00
parent 402837bbfa
commit 955fe1bc77
6 changed files with 25 additions and 21 deletions
+2 -2
View File
@@ -74,7 +74,7 @@ func (h OpHandler) Add(o *ui.Ops) {
if h.Focus {
data[1] = 1
}
o.Write(data, []interface{}{h.Key})
o.Write(data, h.Key)
}
func (h *OpHandler) Decode(d []byte, refs []interface{}) {
@@ -90,7 +90,7 @@ func (h *OpHandler) Decode(d []byte, refs []interface{}) {
func (h OpHideInput) Add(o *ui.Ops) {
data := make([]byte, ops.TypeHideInputLen)
data[0] = byte(ops.TypeHideInput)
o.Write(data, nil)
o.Write(data)
}
func (Edit) ImplementsEvent() {}