Explorar o código

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 %!s(int64=3) %!d(string=hai) anos
pai
achega
4b4ee95cdb
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  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();
                 highlight_search(index);
                 start_highlighted_search_timer();
+                set_cursor(index, SelectionUpdate::None, true);
             }
 
             event.accept();