-
-
Notifications
You must be signed in to change notification settings - Fork 312
Open
Labels
Description
Small description
a .vdj replay file cannot apply commands to hidden columns
Steps to reproduce
cd sample_data; vd -p replay.vdj
where replay.vdj has:
#!vd -p
{"longname": "open-file", "input": "benchmark.csv", "keystrokes": "o", "replayable": true}
{"sheet": "benchmark", "col": "Paid", "row": "", "longname": "hide-col", "input": "", "keystrokes": "-", "comment": "hide the current column", "replayable": true}
{"sheet": "benchmark", "col": "Paid", "row": "", "longname": "resize-col-max", "input": "", "keystrokes": "_", "comment": "toggle width of current column between full and default width", "replayable": true}
The last command, which unhides the hidden column, causes warnings:
no "Paid" column on benchmark
replay aborted during resize-col-max
The problem is the use of moveToCol
in moveToReplayContext
:
Line 262 in fc6ca2f
vs.moveToCol(r.col) or vd.error(f'no "{r.col}" column on {vs}') |
moveToCol()
only checks visible columns, not hidden ones:Line 119 in fc6ca2f
vcolidx = indexMatch(vs.visibleCols, lambda c,name=col: name == c.name) |