1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-12 02:30:30 +09:00

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.
This commit is contained in:
Vrins 2022-02-17 18:42:02 +01:00 committed by Andreas Kling
parent 044be82567
commit 4b4ee95cdb
Notes: sideshowbarker 2024-07-17 17:21:09 +09:00

View file

@ -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();