[Urwid] Problem with Text widgets & leading spaces

Ian Ward ian at excess.org
Wed Mar 22 12:47:13 EST 2006


Rebecca Breu wrote:

>Hi all!
>
>I observed a problem with Text widgets that begin with a space.
>
>If I put such Text widgets into a ListBox, and resize the terminal window
>to something very narrow, that can lead to an AssertionError. Without leading
>spaces (if I replace them by underscores, for example), all works just fine.
>  
>
As it turns out I just fixed a similar problem when the wrapping mode is 
set to 'clip'.

I've attached a fix for urwid/util.py, and I've tested it with your 
program and an xterm at 3, 2 and 1 column wide. This change will be 
included in 0.9.3.

Thanks for the bug report!

Ian

-------------- next part --------------
A non-text attachment was scrubbed...
Name: util.3col.diff
Type: text/x-patch
Size: 1534 bytes
Desc: not available
Url : http://lists.excess.org/pipermail/urwid/attachments/20060322/80baec30/util.3col.bin


More information about the Urwid mailing list