mirror of
https://github.com/Drezil/imgui.git
synced 2025-09-17 16:43:14 +02:00
TypingSelect: always enable nav highlight.
Otherwise in non multi-select contexts as nav dosn't automatically select result would not always be visible.
This commit is contained in:
@ -6730,14 +6730,13 @@ int ImGui::TypingSelectFindMatch(ImGuiTypingSelectRequest* req, int items_count,
|
||||
{
|
||||
if (req == NULL || req->SelectRequest == false) // Support NULL parameter so both calls can be done from same spot.
|
||||
return -1;
|
||||
ImGuiContext& g = *GImGui;
|
||||
int idx = -1;
|
||||
if (req->SingleCharMode && (req->Flags & ImGuiTypingSelectFlags_AllowSingleCharMode))
|
||||
idx = TypingSelectFindNextSingleCharMatch(req, items_count, get_item_name_func, user_data, nav_item_idx);
|
||||
else
|
||||
idx = TypingSelectFindBestLeadingMatch(req, items_count, get_item_name_func, user_data);
|
||||
if (idx != -1)
|
||||
g.NavDisableMouseHover = true;
|
||||
NavRestoreHighlightAfterMove();
|
||||
return idx;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user