spreadsheet

terminal spreadsheet application
git clone https://git.ce9e.org/spreadsheet.git

commit
ab85e2e6055a2fab8da507d2e795624a17b62caf
parent
1dbe4aeb58c046b9b7634c21afaf43cecdd5f3ed
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2024-07-20 17:45
fix csv dump on empty sheet

Diffstat

M sheet/csv.py 4 ++--

1 files changed, 2 insertions, 2 deletions


diff --git a/sheet/csv.py b/sheet/csv.py

@@ -34,8 +34,8 @@ def dump_csv(sheet, fh, *, display=False, **kwargs):
   34    34     else:
   35    35         get = sheet.get_raw
   36    36 
   37    -1     width = max(cell[0] for cell in sheet.raw) + 1
   38    -1     height = max(cell[1] for cell in sheet.raw) + 1
   -1    37     width = max((cell[0] for cell in sheet.raw), default=0) + 1
   -1    38     height = max((cell[1] for cell in sheet.raw), default=0) + 1
   39    39 
   40    40     w = csv.writer(fh, **kwargs)
   41    41     for y in range(height):