Draw a pick's references in the draw group of the read of the name, where the draw fences survey them

This commit is contained in:
2026-10-03 02:18:21 +02:00
committed by Lillem4n
parent 4362905b82
commit df63d0f562
5 changed files with 14 additions and 34 deletions
+6 -11
View File
@@ -51,10 +51,9 @@ type renderScope struct {
entry *drawMemo
base int
// pick is the named pick what renders is part of, at pickKey, its path from the name; nil
// outside one. refs is the draw groups of the last pick entered, nil before one.
// outside one.
pick *namedPick
pickKey string
refs *renderDraws
}
type renderedRow struct {
@@ -91,20 +90,16 @@ func (sc renderScope) rowOf(t *table) int {
}
func (sc renderScope) groupDraws() *groupDraws {
draws := sc.draws
if sc.refs != nil {
draws = sc.refs
}
if sc.group == "" {
return &draws.unnamed
return &sc.draws.unnamed
}
d, drew := draws.named[sc.group]
d, drew := sc.draws.named[sc.group]
if !drew {
if draws.named == nil {
draws.named = map[string]*groupDraws{}
if sc.draws.named == nil {
sc.draws.named = map[string]*groupDraws{}
}
d = &groupDraws{}
draws.named[strings.Clone(sc.group)] = d
sc.draws.named[strings.Clone(sc.group)] = d
}
return d
}