diff --git a/visidata/canvas.py b/visidata/canvas.py index d34a7f39a..44ef2a915 100644 --- a/visidata/canvas.py +++ b/visidata/canvas.py @@ -305,7 +305,7 @@ def _overlaps(a, b): for o, fldraw in line: if fldraw: char_x, char_y, txt, attr, row = o - clipdraw(scr, char_y, char_x, txt, attr, len(txt)) + clipdraw(scr, char_y, char_x, txt, attr, dispwidth(txt)) # - has a cursor, of arbitrary position and width/height (not restricted to current zoom) @@ -359,7 +359,7 @@ def plotColor(self, k): del self.legends[lastlegend] legend = '[other]' - self.legendwidth = max(self.legendwidth, len(legend)) + self.legendwidth = max(self.legendwidth, dispwidth(legend)) self.legends[legend] = attr self.plotAttrs[k] = attr self.plotlegends()