[Urwid] Bug found with selectable widget snapping while scrolling listbox.

Ian Ward ian at excess.org
Tue Dec 1 19:38:29 EST 2009


Dominic LoBue wrote:
> Attached is a new hg export. I changed the behavior to what you
> suggested. In addition I added the boolean attribute _snap to the
> listbox. When _snap is set to True, the listbox scrolling behavior
> snaps to to selectable widgets. When _snap is set to False, it
> doesn't.
> 
> Obviously not a perfect solution - the ideal would be to have the
> scroller look for a "snap" attribute in the widget it is scrolling to,
> and if that attribute is True, then snap. But I figured this was a
> happy middle ground to get by until you separate scrolling from the
> listbox like you wanted.
> 
> Dominic

This patch seems broken for me (expected indented block) and if I fix
that then the unit tests fail.  Maybe the tests just need to be updated
but that should be done carefully, along with adding a new test for the
new behaviour.

I'll look at it when I have some time.

Ian



More information about the Urwid mailing list