##// END OF EJS Templates
color: sync text attributes and buffered text output on Windows (issue5508)...
Matt Harbison -
r31499:31d2ddfd default
parent child Browse files
Show More
@@ -463,9 +463,11 b" if pycompat.osname == 'nt':"
463 for sattr in m.group(1).split(';'):
463 for sattr in m.group(1).split(';'):
464 if sattr:
464 if sattr:
465 attr = mapcolor(int(sattr), attr)
465 attr = mapcolor(int(sattr), attr)
466 ui.flush()
466 _kernel32.SetConsoleTextAttribute(stdout, attr)
467 _kernel32.SetConsoleTextAttribute(stdout, attr)
467 writefunc(m.group(2), **opts)
468 writefunc(m.group(2), **opts)
468 m = re.match(ansire, m.group(3))
469 m = re.match(ansire, m.group(3))
469 finally:
470 finally:
470 # Explicitly reset original attributes
471 # Explicitly reset original attributes
472 ui.flush()
471 _kernel32.SetConsoleTextAttribute(stdout, origattr)
473 _kernel32.SetConsoleTextAttribute(stdout, origattr)
General Comments 0
You need to be logged in to leave comments. Login now