Give a table's current row one owner, the pin set, and return a column's null from its read

This commit is contained in:
2026-09-27 23:48:31 +02:00
committed by Lillem4n
parent 52292d3669
commit 3b77ed6b06
6 changed files with 38 additions and 31 deletions
+6 -7
View File
@@ -61,19 +61,18 @@ func render(s *session, n node, sc renderScope) string {
case *nullItem:
return ""
case *table:
sc.t, sc.row = n, n.drawRow(s)
var own pinSet
own.add(n, n.drawRow(s))
sc.pins = &own
return expand(s, n.formatTemplate, sc)
case *tableRow:
sc.t, sc.row = n.t, sc.hold().pins.mustRow(n.t)
return expand(s, n.t.formatTemplate, sc)
case *tableColumn:
if sc.t != n.t {
sc.t, sc.row = n.t, sc.hold().pins.mustRow(n.t)
}
if cell := n.t.cellTemplate(sc.row, n.i); cell != nil {
row := sc.rows().mustRow(n.t)
if cell := n.t.cellTemplate(row, n.i); cell != nil {
return render(s, cell, sc)
}
return n.t.cell(sc.row, n.i)
return n.t.cell(row, n.i)
case *template:
sc = sc.in(n)
if n.repeat == 1 {