Skip to content

Commit

Permalink
[ddwplay-] use dispwidth instead of len in Animation width calc
Browse files Browse the repository at this point in the history
  • Loading branch information
midichef committed Jan 6, 2025
1 parent cb2bad3 commit 1c707a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion visidata/ddwplay.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def load_from(self, fp):
self.total_ms = sum(f.duration_ms or 0 for f in self.frames.values())
for f in self.frames.values():
for r, x, y, _ in self.iterdeep(f.rows):
self.width = max(self.width, x+len(r.text))
self.width = max(self.width, x+dispwidth(r.text))
self.height = max(self.height, y)

def draw(self, scr, *, t=0, x=0, y=0, loop=False, attr=ColorAttr(), **kwargs):
Expand Down

0 comments on commit 1c707a1

Please sign in to comment.