~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/ui/text.py

  • Committer: John Arbash Meinel
  • Date: 2009-12-16 20:01:49 UTC
  • mfrom: (4903 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4904.
  • Revision ID: john@arbash-meinel.com-20091216200149-jg71giy0qp27bfv0
Merge bzr.dev 4903, resolve NEWS

Show diffs side-by-side

added added

removed removed

Lines of Context:
248
248
        self._term_file = term_file
249
249
        # true when there's output on the screen we may need to clear
250
250
        self._have_output = False
251
 
        # XXX: We could listen for SIGWINCH and update the terminal width...
252
 
        # https://launchpad.net/bugs/316357
253
 
        self._width = osutils.terminal_width()
254
251
        self._last_transport_msg = ''
255
252
        self._spin_pos = 0
256
253
        # time we last repainted the screen
267
264
 
268
265
    def _show_line(self, s):
269
266
        # sys.stderr.write("progress %r\n" % s)
270
 
        if self._width is not None:
271
 
            n = self._width - 1
272
 
            s = '%-*.*s' % (n, n, s)
 
267
        width = osutils.terminal_width()
 
268
        if width is not None:
 
269
            # we need one extra space for terminals that wrap on last char
 
270
            width = width - 1
 
271
            s = '%-*.*s' % (width, width, s)
273
272
        self._term_file.write('\r' + s + '\r')
274
273
 
275
274
    def clear(self):