[PATCH] obtain terminal_width via curses

Martin Pool mbp at sourcefrog.net
Wed Apr 26 12:50:06 BST 2006


On 26/04/2006, at 9:24 PM, Robert Collins wrote:

> On Mon, 2006-04-24 at 18:56 -0400, Aaron Bentley wrote:
>> Robert Widhopf-Fenk wrote:
>>> The attached patch modifies "bzr log --log-format line" to
>>> use the actual terminal width instead of a hard coded 79.
>>
>> That is, on an 80-column terminal, it now uses all 80 columns.   
>> Are you
>> convinced this is the right thing to do?
>
> I'm not - there are no small number of terminals which scroll the  
> screen
> when the bottom right square is filled.

Also (iirc) some terminal emulators will assume the lines ought to  
wrap together if text extends to column 80.

I'd definitely prefer it was $width-1, as at present.  My vote would  
be for Gustavo's simpler TIOCGWINSZ plus Robert Widhopf-Fenk's  
adjustment to log.

-- 
Martin







More information about the bazaar mailing list