UI: the macro step editor works only on the workbook it opened in

The macro.* commands act on the active workbook, and the editor stays
open while another one becomes active (File > New, Switch Window, an
agent). A new draft saved then went into that other workbook, and Check,
Run and Debug ran there. The editor now keeps the workbook it opened in:
while another one is active it says so, its controls are disabled,
Save, Check, Run and starting Debug refuse with a message that names
the workbook, the grid overlays are hidden and closing does not put the
selection back on the wrong sheet. Closing the workbook closes the
editor.
This commit is contained in:
prxnvt
2026-10-25 06:48:57 -04:00
parent 73b0edd085
commit a206178209
3 changed files with 97 additions and 11 deletions
+4 -1
View File
@@ -290,7 +290,10 @@ other macros open; a macro that was left out is not in the saved file.
reference boxes that take a typed reference or a selection on the grid and switch between a
token relative to the example input (Rel) and an absolute reference (Abs); the Inputs tab sets
each input's shape, header and column types, and Use current selection as example infers them;
the Output tab sets the anchor and what to do when results would land on data.
the Output tab sets the anchor and what to do when results would land on data. The editor
belongs to the workbook it opened in: while another workbook is active it says so and Save,
Check, Run and Debug wait until that workbook is active again, and closing the workbook closes
the editor.
- **Debug bar.** Check dry-runs the macro and colours the grid: inputs blue, the cells it writes
green, the cells among them that hold data red. Run runs it as one undo step. Step, Continue and
Run to Here start the debugger when needed (`macro.debug` with the editor's breakpoints and