Skip to content

Commit

Permalink
modify/changestr: sum a list of row lengths rather than a generator
Browse files Browse the repository at this point in the history
Trying to sum a generator kills a vgit test, and _probably_ blows stuff
up elsewhere too sometimes.
  • Loading branch information
ajkerrigan committed Sep 1, 2023
1 parent 5961413 commit c8d5348
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion visidata/modify.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ def changestr(self, adds, mods, deletes):

if mods:
if cstr: cstr += ' and '
cstr += 'change %d values' % sum(len(rowmods) for row, rowmods in mods.values())
cstr += 'change %d values' % sum([len(rowmods) for row, rowmods in mods.values()])

if deletes:
if cstr: cstr += ' and '
Expand Down

0 comments on commit c8d5348

Please sign in to comment.