Comment 5 for bug 3507

Revision history for this message
Martin Pool (mbp) wrote : obtain terminal_width via curses

 From: <email address hidden>
 Subject: [PATCH] obtain terminal_width via curses
 Date: 25 April 2006 8:24:57 AM
 To: <email address hidden>

The attached patch modifies "bzr log --log-format line" to
use the actual terminal width instead of a hard coded 79.

Further osutils.py:terminal_width() is modified to use the
curses module to get the current terminal width.

In order to avoid flickering due to subsequent calls to
curses.initsrc(), the width is saved in a global variable.
It should not change the line buffering of stdout, but still
seems to do it on my terminal/curses/python combination for
the output of "bzr log ..."