Show More
@@ -308,8 +308,7 b' class colorui(uimod.ui):' | |||||
308 | else: |
|
308 | else: | |
309 | self._buffers[-1].extend(args) |
|
309 | self._buffers[-1].extend(args) | |
310 | elif self._colormode == 'win32': |
|
310 | elif self._colormode == 'win32': | |
311 | for a in args: |
|
311 | color.win32print(super(colorui, self).write, *args, **opts) | |
312 | color.win32print(a, super(colorui, self).write, **opts) |
|
|||
313 | else: |
|
312 | else: | |
314 | return super(colorui, self).write( |
|
313 | return super(colorui, self).write( | |
315 | *[self.label(a, label) for a in args], **opts) |
|
314 | *[self.label(a, label) for a in args], **opts) | |
@@ -322,8 +321,7 b' class colorui(uimod.ui):' | |||||
322 | if self._bufferstates and self._bufferstates[-1][0]: |
|
321 | if self._bufferstates and self._bufferstates[-1][0]: | |
323 | return self.write(*args, **opts) |
|
322 | return self.write(*args, **opts) | |
324 | if self._colormode == 'win32': |
|
323 | if self._colormode == 'win32': | |
325 | for a in args: |
|
324 | color.win32print(super(colorui, self).write_err, *args, **opts) | |
326 | color.win32print(a, super(colorui, self).write_err, **opts) |
|
|||
327 | else: |
|
325 | else: | |
328 | return super(colorui, self).write_err( |
|
326 | return super(colorui, self).write_err( | |
329 | *[self.label(a, label) for a in args], **opts) |
|
327 | *[self.label(a, label) for a in args], **opts) |
@@ -288,7 +288,11 b" if pycompat.osname == 'nt':" | |||||
288 | ansire = re.compile('\033\[([^m]*)m([^\033]*)(.*)', |
|
288 | ansire = re.compile('\033\[([^m]*)m([^\033]*)(.*)', | |
289 | re.MULTILINE | re.DOTALL) |
|
289 | re.MULTILINE | re.DOTALL) | |
290 |
|
290 | |||
291 |
def win32print( |
|
291 | def win32print(writefunc, *msgs, **opts): | |
|
292 | for text in msgs: | |||
|
293 | _win32print(text, writefunc, **opts) | |||
|
294 | ||||
|
295 | def _win32print(text, writefunc, **opts): | |||
292 | label = opts.get('label', '') |
|
296 | label = opts.get('label', '') | |
293 | attr = origattr |
|
297 | attr = origattr | |
294 |
|
298 |
General Comments 0
You need to be logged in to leave comments.
Login now