Reuse the leaf's moved key in readUnder, so the lowest Go meets the allocation gate

This commit is contained in:
2026-10-09 11:28:11 +02:00
committed by Lillem4n
parent 5a010952d6
commit f81aa1a56e
+2 -1
View File
@@ -82,9 +82,10 @@ func readUnder(s *drawstate.State, t *template, env renderEnv, a arm) readValue
return r
}
levels := make([]pickKey, len(a.levels))
for i, l := range a.levels {
for i, l := range a.levels[:len(levels)-1] {
levels[i] = env.pickAt.under(l)
}
levels[len(levels)-1] = key // the leaf's level, already moved; moving it again allocates
leaf, pins := p.draw(s, t.startOf(a.head), a.steps, levels)
return p.renderAt(s, leaf, pins, key, env)
}