From: Simon Glass <simon.glass@canonical.com> When closing a text-input object (textline or textedit) with Enter (BKEY_SELECT), scene_txtin_close() is not called. This leaves the vidconsole context in a bad state, causing rendering issues. Also, the code falls through to process '\n' via cread_line_process_ch(), which incorrectly adds a newline character to the text buffer. Fix this by calling scene_txtin_close() for BKEY_SELECT, matching the behaviour of BKEY_QUIT, and breaking instead of falling through. Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: Simon Glass <simon.glass@canonical.com> --- boot/scene_txtin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/boot/scene_txtin.c b/boot/scene_txtin.c index da8d49af04f..43a6c00d497 100644 --- a/boot/scene_txtin.c +++ b/boot/scene_txtin.c @@ -199,8 +199,8 @@ int scene_txtin_send_key(struct scene_obj *obj, struct scene_txtin *tin, break; event->type = EXPOACT_CLOSE; event->select.id = obj->id; - key = '\n'; - fallthrough; + scene_txtin_close(scn, tin); + break; default: cread_line_process_ch(cls, key); break; -- 2.43.0