diff --git a/docs/changelog.txt b/docs/changelog.txt index d4b23d229..ece6f04e1 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -38,6 +38,7 @@ changelog.txt uses a syntax similar to RST, with a few special sequences: ## Fixes - ``Units::isFortControlled``: Account for agitated wildlife - Fix right click sometimes closing both a DFHack window and a vanilla panel +- Fixed issue with scrollable lists having some data off-screen if they were scrolled before being made visible ## Misc Improvements - `automelt`: is now more resistent to savegame corruption diff --git a/library/lua/gui/widgets.lua b/library/lua/gui/widgets.lua index ddbeeee6f..d8c605b93 100644 --- a/library/lua/gui/widgets.lua +++ b/library/lua/gui/widgets.lua @@ -1638,6 +1638,7 @@ end function List:postComputeFrame(body) self.page_size = math.max(1, math.floor(body.height / self.row_height)) + self.page_top = math.max(1, math.min(#self.choices - self.page_size + 1)) update_list_scrollbar(self) end