[Concept,00/16] expo: Add multiline editing support for textedit

Message ID 20260122041155.174721-1-sjg@u-boot.org
Headers
Series expo: Add multiline editing support for textedit |

Message

Simon Glass Jan. 22, 2026, 4:11 a.m. UTC
  From: Simon Glass <simon.glass@canonical.com>

This series enhances the expo text-input handling, particularly for the
textedit object which supports multi-line text.

The vidconsole uses a single shared context for cursor state, which causes
problems when text-input objects need their own cursor blinking. This series
adds dedicated vidconsole contexts for text input, then removes the old
entry save/restore mechanism which is no longer needed.

For multiline editing , this series adds support for navigating between
visual lines using Ctrl-P and Ctrl-N. The expo textedit uses text measurement
to position the cursor at the correct pixel location within multi-line text,
maintaining the horizontal position when moving between lines.

The series also fixes some bugs in text-input handling and adds some tests for
rendering and keypress-handling.


Simon Glass (16):
  video: Update vidconsole_idle() to process all contexts
  expo: Add tin parameter to scene_txtin_close()
  test: expo: Use expo_enter_mode() in textline render test
  expo: Use a dedicated vidconsole-context for text input
  expo: Drop entry save/restore in textline rendering
  video: Remove vidconsole_entry_save/restore()
  test: video: Add tests for independent vidconsole contexts
  expo: Fix text-input close on BKEY_SELECT
  expo: Fix text-input buffer size for CLI editing
  test: expo: Add open/close testing to expo_render_textedit
  test: expo: Add keypress tests to expo_render_textedit
  cli: Add multiline support to CLI line editing
  video: Add len parameter to vidconsole_measure()
  expo: support cursor positioning for multiline textedits
  expo: Add visual line navigation for multi-line textedit
  test: expo: Add more keypress tests for textedit

 boot/scene.c                      |   7 +-
 boot/scene_internal.h             |  13 +-
 boot/scene_txtin.c                | 218 +++++++++++++++++++++++++-----
 common/cli_readline.c             |  17 +++
 drivers/video/console_normal.c    |  32 -----
 drivers/video/console_truetype.c  |  43 +-----
 drivers/video/vidconsole-uclass.c |  50 ++-----
 include/cli.h                     |   9 +-
 include/expo.h                    |   4 +-
 include/video_console.h           |  56 +-------
 test/boot/expo.c                  | 142 +++++++++++++++++++
 test/dm/video.c                   | 109 +++++++++------
 12 files changed, 458 insertions(+), 242 deletions(-)