ui: let OpsReader keep track of references

Instead of exposing the entire reference slice, return the relevant
references from Next.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-06-01 20:48:36 +02:00
parent 5966aab77e
commit 0d2cffe196
11 changed files with 166 additions and 104 deletions
+2 -2
View File
@@ -80,14 +80,14 @@ func resolveFocus(r *ui.OpsReader, focus Key) (Key, listenerPriority, bool) {
var hide bool
loop:
for {
data, ok := r.Decode()
data, refs, ok := r.Decode()
if !ok {
break
}
switch ops.OpType(data[0]) {
case ops.TypeKeyHandler:
var op OpHandler
op.Decode(data, r.Refs)
op.Decode(data, refs)
var newPri listenerPriority
switch {
case op.Focus: