Skip to content

Commit

Permalink
[vds-] use blank line for sheets with no rows #2342
Browse files Browse the repository at this point in the history
  • Loading branch information
saulpw committed Oct 4, 2024
1 parent eebb684 commit a0ace0f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions visidata/loaders/vds.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ def save_vds(vd, p, *sheets):
d['col'] = type(col).__name__
fp.write('#'+json.dumps(d)+NL)

if not vs.rows:
fp.write(NL) #2342 blank line to separate sheets without rows
continue

with Progress(gerund='saving'):
for row in vs.iterdispvals(*vs.columns, format=False):
d = {col.name:val for col, val in row.items()}
Expand Down

0 comments on commit a0ace0f

Please sign in to comment.