Show More
@@ -29,6 +29,7 b' class ui(object):' | |||
|
29 | 29 | interactive=True, traceback=False, report_untrusted=True, |
|
30 | 30 | parentui=None): |
|
31 | 31 | self.overlay = None |
|
32 | self.buffers = [] | |
|
32 | 33 | if parentui is None: |
|
33 | 34 | # this is the parent of all ui children |
|
34 | 35 | self.parentui = None |
@@ -367,9 +368,18 b' class ui(object):' | |||
|
367 | 368 | path = self.config("paths", default) |
|
368 | 369 | return path or loc |
|
369 | 370 | |
|
371 | def pushbuffer(self): | |
|
372 | self.buffers.append([]) | |
|
373 | ||
|
374 | def popbuffer(self): | |
|
375 | return "".join(self.buffers.pop()) | |
|
376 | ||
|
370 | 377 | def write(self, *args): |
|
371 | for a in args: | |
|
372 | sys.stdout.write(str(a)) | |
|
378 | if self.buffers: | |
|
379 | self.buffers[-1].extend([str(a) for a in args]) | |
|
380 | else: | |
|
381 | for a in args: | |
|
382 | sys.stdout.write(str(a)) | |
|
373 | 383 | |
|
374 | 384 | def write_err(self, *args): |
|
375 | 385 | try: |
General Comments 0
You need to be logged in to leave comments.
Login now