714714-- OrdersSearchOverlay
715715--
716716
717- local search_cursor_visible = false
718717local search_matched_indices = {}
719718local search_current_match_idx = 0
720719local order_names_checksum = nil
@@ -836,12 +835,6 @@ function OrdersSearchOverlay:update_filter()
836835 search_matched_indices = perform_search (text )
837836 search_current_match_idx = 0
838837
839- if # search_matched_indices > 0 then
840- search_cursor_visible = true
841- else
842- search_cursor_visible = false
843- end
844-
845838 if text == ' ' then
846839 self .subviews .main_panel .frame_title = ' Search'
847840 else
@@ -867,7 +860,6 @@ function OrdersSearchOverlay:cycle_match(direction)
867860 if # new_matches == 0 then
868861 search_matched_indices = {}
869862 search_current_match_idx = 0
870- search_cursor_visible = false
871863 self .subviews .main_panel .frame_title = ' Search'
872864 return
873865 end
@@ -886,7 +878,6 @@ function OrdersSearchOverlay:cycle_match(direction)
886878 -- Scroll to the selected match
887879 local order_idx = search_matched_indices [search_current_match_idx ]
888880 mi .info .work_orders .scroll_position_work_orders = order_idx
889- search_cursor_visible = true
890881
891882 self .subviews .main_panel .frame_title = ' Search' .. self :get_match_text ()
892883end
@@ -1038,7 +1029,7 @@ OrderHighlightOverlay.ATTRS{
10381029function OrderHighlightOverlay :render (dc )
10391030 OrderHighlightOverlay .super .render (self , dc )
10401031
1041- if mi .job_details .open or not search_cursor_visible then return end
1032+ if mi .job_details .open or # search_matched_indices == 0 then return end
10421033
10431034 -- Periodic check for order name changes
10441035 check_frame_counter = check_frame_counter + 1
0 commit comments