We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0f7174d commit 806ff7bCopy full SHA for 806ff7b
1 file changed
plugins/lua/orders.lua
@@ -950,9 +950,12 @@ function OrdersSearchOverlay:cycle_match(direction)
950
self.matched_indices = new_matches
951
self.current_match_idx = new_match_idx
952
953
- -- Scroll to the selected match
+ -- Scroll to the selected match only if not already visible
954
local order_idx = self.matched_indices[self.current_match_idx]
955
- mi.info.work_orders.scroll_position_work_orders = order_idx
+ local viewport_start, viewport_end = getVisibleOrderIndices()
956
+ if order_idx < viewport_start or order_idx > viewport_end then
957
+ mi.info.work_orders.scroll_position_work_orders = order_idx
958
+ end
959
960
self.subviews.main_panel.frame_title = 'Search' .. self:get_match_text()
961
end
0 commit comments