Mercurial > hg-stable
comparison hgext/color.py @ 27259:290b41913d9f
color: drop useless override of ui.popbuffer()
Because labels are applied at write() time since 717b75ae5bb0,
colorui.popbuffer() is useless and it doesn't update _bufferapplylabels
correctly. Removing it should fix the problem.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 05 Dec 2015 23:41:11 +0900 |
parents | f04bd381e8c0 |
children | ccb33e965150 |
comparison
equal
deleted
inserted
replaced
27258:beda2c9dbbff | 27259:290b41913d9f |
---|---|
417 "(configured in color.%s)\n") | 417 "(configured in color.%s)\n") |
418 % (e, status)) | 418 % (e, status)) |
419 _styles[status] = ' '.join(good) | 419 _styles[status] = ' '.join(good) |
420 | 420 |
421 class colorui(uimod.ui): | 421 class colorui(uimod.ui): |
422 def popbuffer(self): | |
423 if self._colormode is None: | |
424 return super(colorui, self).popbuffer() | |
425 | |
426 self._bufferstates.pop() | |
427 return ''.join(self._buffers.pop()) | |
428 | |
429 _colormode = 'ansi' | 422 _colormode = 'ansi' |
430 def write(self, *args, **opts): | 423 def write(self, *args, **opts): |
431 if self._colormode is None: | 424 if self._colormode is None: |
432 return super(colorui, self).write(*args, **opts) | 425 return super(colorui, self).write(*args, **opts) |
433 | 426 |