1package ui23import (4 tea "charm.land/bubbletea/v2"56 "src.rest/cat/012/internal/ui/evalview"7)89// Data > Evaluate formula: the active cell's formula stepped through one10// part at a time in a box over the grid (package evalview), the values11// from the engine's sheet.Steps.1213func init() {14 register(&command{id: "data.evaluate", macro: macroView, title: "Evaluate formula",15 desc: "Step through the active cell's formula one part at a time, each part's value in its place",16 enabled: func(m *Model) bool {17 c := m.sheet.Cell(m.cur)18 return c != nil && c.IsFormula()19 },20 run: func(m *Model) tea.Cmd {21 if st := m.sheet.EvaluateSteps(m.cur); st != nil {22 m.clearSelection()23 m.openOverlay(evalview.New(m.host(), st))24 }25 return nil26 }})27 keymap["alt+="] = "data.evaluate"28}