~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/ui/text.py

Fixed garbage in progress/warning interactions

Show diffs side-by-side

added added

removed removed

Lines of Context:
62
62
        if self._progress_bar_stack is None:
63
63
            self._progress_bar_stack = bzrlib.progress.ProgressBarStack()
64
64
        return self._progress_bar_stack.get_nested()
 
65
 
 
66
    def clear_term(self):
 
67
        """Prepare the terminal for output.
 
68
 
 
69
        This will, clear any progress bars, and leave the cursor at the
 
70
        leftmost position."""
 
71
        if self._progress_bar_stack is None:
 
72
            return
 
73
        overall_pb = self._progress_bar_stack.bottom()
 
74
        if overall_pb is not None:
 
75
            overall_pb.clear()