Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/input.c
Original file line number Diff line number Diff line change
Expand Up @@ -857,6 +857,9 @@ iui_textfield_result iui_textfield_with_selection(
if (!ctx->current_window || !buffer || !state || size == 0)
return result;

/* Register this text field for per-frame tracking */
iui_register_textfield(ctx, buffer);

/* Default options if NULL */
iui_textfield_options opts = {0};
if (options)
Expand Down
6 changes: 5 additions & 1 deletion src/searchbar.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ iui_search_bar_result iui_search_bar_ex(iui_context *ctx,
if (!ctx || !ctx->current_window || !buffer || !cursor || size == 0)
return result;

/* Register this text field for per-frame tracking */
iui_register_textfield(ctx, buffer);

/* Default icons */
const char *lead_icon = leading_icon ? leading_icon : "search";
bool has_text = (buffer[0] != '\0');
Expand Down Expand Up @@ -344,8 +347,9 @@ bool iui_search_view_begin(iui_context *ctx,
ctx->colors.surface_container_high,
ctx->renderer.user);

/* Auto-focus the search field */
/* Auto-focus the search field and register for tracking */
ctx->focused_edit = search->query;
iui_register_textfield(ctx, search->query);

/* Handle text input */
iui_process_text_input(ctx, search->query, sizeof(search->query),
Expand Down
Loading