From 448d408d1a8c8fe4fd7e21df995af9bd8e493b1b Mon Sep 17 00:00:00 2001 From: christoph-heinrich Date: Fri, 3 Nov 2023 09:51:14 +0100 Subject: [PATCH] tweak: update scroll position when moving items like when navigating (#763) --- src/uosc/elements/Menu.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/uosc/elements/Menu.lua b/src/uosc/elements/Menu.lua index a9456c11..50854850 100644 --- a/src/uosc/elements/Menu.lua +++ b/src/uosc/elements/Menu.lua @@ -595,7 +595,7 @@ function Menu:move_selected_item_to(index) if callback and from and from ~= index and index >= 1 and index <= #self.current.items then callback(from, index, self.current.submenu_path) self.current.selected_index = index - self:set_scroll_by((index - from) * self.scroll_step) + self:scroll_to_index(index, self.current, true) end end