summaryrefslogtreecommitdiff
path: root/src/ui/helpers.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/helpers.cpp')
-rw-r--r--src/ui/helpers.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ui/helpers.cpp b/src/ui/helpers.cpp
index 7bde384..6ca1bd2 100644
--- a/src/ui/helpers.cpp
+++ b/src/ui/helpers.cpp
@@ -59,6 +59,7 @@ int TextInputWithAutocomplete(const char* label, const char* hint, char* buffer,
for (int i = 0; i < suggestion_count; ++i)
{
+ ImGui::PushID(i);
if (ImGui::Selectable(suggestions[i]))
{
// Copy selected suggestion to buffer
@@ -67,6 +68,7 @@ int TextInputWithAutocomplete(const char* label, const char* hint, char* buffer,
result = i;
is_open = false;
}
+ ImGui::PopID();
}
ImGui::EndChild();