mercurial/utils/stringutil.py
changeset 49284 d44e3c45f0e4
parent 49030 75794847ef62
child 49575 bbbb5213d043
equal deleted inserted replaced
49283:44b26349127b 49284:d44e3c45f0e4
   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