mercurial/color.py
changeset 31499 31d2ddfd338c
parent 31123 df0a0734304a
child 31518 43d6ef658874
--- a/mercurial/color.py	Sun Mar 19 14:42:45 2017 -0400
+++ b/mercurial/color.py	Sun Mar 19 12:44:45 2017 -0400
@@ -463,9 +463,11 @@
                 for sattr in m.group(1).split(';'):
                     if sattr:
                         attr = mapcolor(int(sattr), attr)
+                ui.flush()
                 _kernel32.SetConsoleTextAttribute(stdout, attr)
                 writefunc(m.group(2), **opts)
                 m = re.match(ansire, m.group(3))
         finally:
             # Explicitly reset original attributes
+            ui.flush()
             _kernel32.SetConsoleTextAttribute(stdout, origattr)