Skip to content

Commit

Permalink
fix: don't scroll to top on menu update during search (#841)
Browse files Browse the repository at this point in the history
  • Loading branch information
christoph-heinrich authored Jan 27, 2024
1 parent 2eccc1b commit 861f121
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/uosc/elements/Menu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -757,8 +757,10 @@ function Menu:search_internal(menu, no_select_first)
end
menu.items = search_items(menu.search.source.items, query, search_submenus)
-- Select 1st item in search results
menu.scroll_y = 0
if not no_select_first then self:select_index(1, menu) end
if not no_select_first then
menu.scroll_y = 0
self:select_index(1, menu)
end
end
self:update_content_dimensions()
end
Expand Down

0 comments on commit 861f121

Please sign in to comment.