Skip to content

Commit

Permalink
Don't truncate wide columns with fixed width saver (#1890)
Browse files Browse the repository at this point in the history
Previously the fixed width saver would truncate saved data to match
viewed column widths.
Now it saves all the data regardless of the viewed column widths.

Co-authored-by: Anja Kefala <[email protected]>
  • Loading branch information
daviewales and anjakefala committed May 9, 2023
1 parent 77ae017 commit 8ef2c48
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions visidata/loaders/fixed_width.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@ def save_fixed(vd, p, *vsheets):
widths = {} # Column -> width:int
# headers
for col in Progress(sheet.visibleCols, gerund='sizing'):
maxWidth = col.getMaxWidth(sheet.rows)
widths[col] = col.width if col.width >= maxWidth else sheet.options.default_width or maxWidth
widths[col] = col.getMaxWidth(sheet.rows) #1849
fp.write(('{0:%s} ' % widths[col]).format(col.name))
fp.write('\n')

Expand Down

0 comments on commit 8ef2c48

Please sign in to comment.