equal
deleted
inserted
replaced
748 """ |
748 """ |
749 |
749 |
750 def _cutdown(self, ucstr, space_left): |
750 def _cutdown(self, ucstr, space_left): |
751 l = 0 |
751 l = 0 |
752 colwidth = encoding.ucolwidth |
752 colwidth = encoding.ucolwidth |
753 for i in pycompat.xrange(len(ucstr)): |
753 for i in range(len(ucstr)): |
754 l += colwidth(ucstr[i]) |
754 l += colwidth(ucstr[i]) |
755 if space_left < l: |
755 if space_left < l: |
756 return (ucstr[:i], ucstr[i:]) |
756 return (ucstr[:i], ucstr[i:]) |
757 return ucstr, b'' |
757 return ucstr, b'' |
758 |
758 |