make ScrollBar check wrapped widgets for SupportsScroll (Fixes #878)#879
Conversation
Pull Request Test Coverage Report for Build 9075496246Details
💛 - Coveralls |
penguinolog: `w.original_widget` can point to `w`, we need to filter such behaviour to prevent infinite loop
| if w in visited: | ||
| break | ||
| visited.add(w) | ||
| yield w |
There was a problem hiding this comment.
http://urwid.org/reference/widget.html#urwid.WidgetDecoration.base_widget exists to get the "most" .original_widget
There was a problem hiding this comment.
Or are there decorations that are scrollable?
There was a problem hiding this comment.
http://urwid.org/reference/widget.html#urwid.WidgetDecoration.base_widget exists to get the "most"
.original_widget
Looking at the code, it is implemented like this generator was originally, i.e., vulnerable to infinite loops. So the fix in e5377cf should be applied also in widget_decoration.py, at least.
I have no idea if there are scrollable decorations; this is my first time working with the urwid code. It seems like a silly thing to implement, but if someone did they might be hit with an extremely confusing bug if we only check the base_widget.
There was a problem hiding this comment.
Or are there decorations that are scrollable?
Scrollable is a decoration adding scroll support to the widgets:
urwid/urwid/widget/scrollable.py
Line 140 in ba5c1c0
Fix static checker warning
Checklist
masterorpython-dual-supportbranchtoxsuccessfully in local environmentDescription:
Fixes #878 .