mirror of
https://github.com/markqvist/NomadNet.git
synced 2026-10-06 16:47:41 +00:00
Always reset _trim_top when canvas fits to avoid stale positioning for click calculation
This commit is contained in:
Vendored
+4
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user