expo: Fix textline edit text not updating in bootflow menu

The edit text object for the passphrase textline is created with an
empty string literal "", rather than pointing to the textline's buffer.
This means that when the user types, tline->buf is updated but the text
object still displays the original empty string.

Fix this by creating the edit text object with abuf_data(&tline->buf) so
it points to the textline's buffer. This matches how expo_build.c
creates textlines for cedit.

Co-developed-by: Claude <claude@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
This commit is contained in:
Simon Glass
2025-12-07 10:28:52 -07:00
parent 7e8bf42d2d
commit f2278377be

View File

@@ -308,7 +308,7 @@ int bootflow_menu_add(struct expo *exp, struct bootflow *bflow, int seq,
snprintf(name, sizeof(name), "item%d.pass.edit", seq);
ret = scene_txt_str(scn, name, ITEM_PASS_EDIT + seq, 0,
"", NULL);
abuf_data(&tline->buf), NULL);
if (ret < 0)
return log_msg_ret("ite", -EINVAL);
tline->edit_id = ret;