Skip to content

Commit

Permalink
tweak: update scroll position when moving items like when navigating (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
christoph-heinrich committed Nov 3, 2023
1 parent d2885dd commit 448d408
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/uosc/elements/Menu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 448d408

Please sign in to comment.