mirror of
https://github.com/markqvist/NomadNet.git
synced 2026-10-26 10:51:40 -04:00
Always reset _trim_top when canvas fits to avoid stale positioning for click calculation
This commit is contained in:
parent
774c08905f
commit
7a7cd8fe23
1 changed files with 4 additions and 0 deletions
4
nomadnet/vendor/Scrollable.py
vendored
4
nomadnet/vendor/Scrollable.py
vendored
|
|
@ -83,6 +83,10 @@ class Scrollable(urwid.WidgetDecoration):
|
|||
|
||||
if canv_cols <= maxcol and canv_rows <= maxrow:
|
||||
# Canvas is small enough to fit without trimming
|
||||
if self._trim_top != 0 or self._scroll_action is not None:
|
||||
# Reset potentially stale _trim_top
|
||||
self._trim_top = 0
|
||||
self._scroll_action = None
|
||||
return canv
|
||||
|
||||
self._adjust_trim_top(canv, size)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue