Skip to content

Commit

Permalink
[vds-] save hidden columns content also #2089 (#2093)
Browse files Browse the repository at this point in the history
Follow-up of 727fd33.

Saving just the expressions of hidden columns isn't enough:
an expression may depend on some data (value) from some hidden column,
resulting in computation errors when loading back the .vds.

Only saving the column metadata is also weird because they'd show in
the columns sheet but result in empty columns values after setting
back a width >0.
  • Loading branch information
pacien authored Oct 30, 2023
1 parent 39e4218 commit 3a9a0c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion visidata/loaders/vds.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def save_vds(vd, p, *sheets):
fp.write('#'+json.dumps(d)+NL)

with Progress(gerund='saving'):
for row in vs.iterdispvals(*vs.visibleCols, format=False):
for row in vs.iterdispvals(*vs.columns, format=False):
d = {col.name:val for col, val in row.items()}
fp.write(json.dumps(d, default=str)+NL)

Expand Down

0 comments on commit 3a9a0c5

Please sign in to comment.