소스 검색

LibGUI: Set cursor when using highlighted_search in abstractview

Previously using the highlighted_search would not set the cursor
to the item found by the search. This results in some unfamiliar
behavior such as jumping back up to the previously selected element,
before searching, when using the arrow keys to navigate.
Vrins 3 년 전
부모
커밋
4b4ee95cdb
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      Userland/Libraries/LibGUI/AbstractView.cpp

+ 1 - 0
Userland/Libraries/LibGUI/AbstractView.cpp

@@ -613,6 +613,7 @@ void AbstractView::keydown_event(KeyEvent& event)
                 m_highlighted_search = sb.to_string();
                 m_highlighted_search = sb.to_string();
                 highlight_search(index);
                 highlight_search(index);
                 start_highlighted_search_timer();
                 start_highlighted_search_timer();
+                set_cursor(index, SelectionUpdate::None, true);
             }
             }
 
 
             event.accept();
             event.accept();