Give a fence walk's pin set one copy, and file the drawn-row half of the pin model

This commit is contained in:
2026-09-24 00:33:15 +02:00
committed by Lillem4n
parent 6b788e324a
commit 939f408ef8
3 changed files with 12 additions and 3 deletions
+7 -1
View File
@@ -163,10 +163,16 @@ func (p *pinSet) inside(t *table, rows []int) []int {
return rows
}
// clone is a copy of p that pins apart from it; a plain copy shares the spill map.
func (p pinSet) clone() pinSet {
p.spill = maps.Clone(p.spill)
return p
}
// entered is p with row r of t: pinned where the render pins it, alone where the render draws it
// to render whole. p is left as it was, since a fence walk branches.
func (p pinSet) entered(t *table, r int, pins bool) pinSet {
p.spill = maps.Clone(p.spill)
p = p.clone()
switch _, in := p.pinned(t); {
case pins:
p.pin(t, r)