From patchwork Fri Jan 30 03:58:23 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 114 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org Authentication-Results: mail.u-boot.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=llpM5DST; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 16B71697CE for ; Thu, 29 Jan 2026 20:59:06 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id URlmZl2q6A5O for ; Thu, 29 Jan 2026 20:59:06 -0700 (MST) Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 01E81697CB for ; Thu, 29 Jan 2026 20:59:06 -0700 (MST) Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 690CF69738 for ; Thu, 29 Jan 2026 20:59:02 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id zoPL042mN_Nz for ; Thu, 29 Jan 2026 20:59:02 -0700 (MST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.167.171; helo=mail-oi1-f171.google.com; envelope-from=sjg@chromium.org; receiver=u-boot.org Received: from mail-oi1-f171.google.com (mail-oi1-f171.google.com [209.85.167.171]) by mail.u-boot.org (Postfix) with ESMTPS id 906356950D for ; Thu, 29 Jan 2026 20:58:57 -0700 (MST) Received: by mail-oi1-f171.google.com with SMTP id 5614622812f47-45effa36208so1180141b6e.1 for ; Thu, 29 Jan 2026 19:58:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1769745536; x=1770350336; darn=u-boot.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=fv6LKVg+8n97IwomyHeK2t+zdeIQww0hTlPumcACrW4=; b=llpM5DSTFUqGaW3hrRy351Uz7N1e2DmtRKBI0lQuqP+12cpM5Kb4eaWGbCZdDNotKx glK5jlbFDfUG4w1hbQregzK7Dj7wjPwPkKe96VSk0OfJ/4iNm8QCLsNLK1k8tDbOgGIv DCZKI+0/v7LrSXlB+kLPdj1a284GeGjqY8W+I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769745536; x=1770350336; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=fv6LKVg+8n97IwomyHeK2t+zdeIQww0hTlPumcACrW4=; b=N4IBQTRJZ+sZ6VKPFsOlH0tIys9ReAAmkmn54ab+C5jdcwiwphHlECGz7X5Dz/jv65 wf/YtcBJr3+VynYH7rWZLUpY83UTBzogUvDCDTu+yYqkUu5muKUI4EoU65UJURrDE0IU RP1qQOl32SGatVxO1u5ywfAdt/nhpRC3Nk/qvV5aKCzEBFwm2n0Qa+QliRID6dlGMQKi 6UTtrp3N9R/wN4X3TyvnG5Hd8vCEv+KX0939WpRlRh7wwZD/LLZfeD4smRiMeKb7yDYC UgIJJ/a/GTIkpo5jxpIK/pf1KXC1i9MOZvdAp8ZLItffU27ODvWqwIYDQZ0pDRnf3QeC +V+w== X-Gm-Message-State: AOJu0YyuaKilNHB3YrZzvVumyQ63SyA4dcUa2pCZ55PvkwVY5+bZASkq 4UaBs+ZwU15Z7f5IVb5IHxNHOi9mD6fwu4hoyC3jo93x5HggaL/VN+mxq5cr8GpgFITf6+p/gJA sEw6PpA== X-Gm-Gg: AZuq6aLR3eWOKrmR2AhNqCt9l6O13mb+syXLb6+bZT9IB91NLuZxhbxOI2bPo3+amI5 l8OvZ9BN7FpT/jyLFTLSniyQlSbTluGHxDBGslZVI9nw+Ts3tUN/mEjen6DnIxgc3TUTh8IMmS3 vBJcIeFKkehbjzSgLLO7vephkaKGSVH+2rBEsnknKRFGN0zLt7aWgqbYhdC+lRj/0Ok+/G9QYsP xP0toUGkl4vkanklksEcPH9ZEgiJy6naNr2gW6D5cKyXUAXKGAdg8inyJW1RACkJLWkm3CDZY63 hQtpGlfHyOzQJnHgxQywoTapvcUcmNJulPlsRBnAlSI9AC/84gXzx0FwuZ3ZMs40xUT0LMZyVRo rnC9cc8oG1cbIMtMB9IHH4fjriwJhjMKKct2wIvP9Kjw42HkSt4E6z4ekzMlOa4aPixS37PhMdv VVG0Ur3nl6f94wVfJ161XE5q3/qk0= X-Received: by 2002:a05:6820:134f:b0:662:fa60:f85c with SMTP id 006d021491bc7-6630f36faf9mr647262eaf.45.1769745536022; Thu, 29 Jan 2026 19:58:56 -0800 (PST) Received: from chromium.org ([73.34.74.121]) by smtp.gmail.com with ESMTPSA id 006d021491bc7-662f9a4e491sm4128687eaf.16.2026.01.29.19.58.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Jan 2026 19:58:54 -0800 (PST) From: Simon Glass X-Google-Original-From: Simon Glass To: U-Boot Concept Date: Thu, 29 Jan 2026 20:58:23 -0700 Message-ID: <20260130035849.3580212-1-simon.glass@canonical.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Message-ID-Hash: 56E7HQLA6APUTF4FXUPRD6MBMNCLQPNJ X-Message-ID-Hash: 56E7HQLA6APUTF4FXUPRD6MBMNCLQPNJ X-MailFrom: sjg@chromium.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 00/19] Enhanced command-line editing with undo/redo support List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: This series adds enhanced editing features to the U-Boot command line, including multi-level undo/redo, yank/paste, word navigation, and multiline editing support for the expo textedit widget. Key features: - Multi-level undo (Ctrl+Z) and redo (Ctrl+Shift+Z) with configurable depth via CONFIG_CMDLINE_UNDO_COUNT - Yank/paste killed text with Ctrl+Y - Word navigation with Ctrl+Left/Right arrows - Home/End key support in sandbox SDL console - Multiline editing mode where Ctrl+K kills to end of line (not buffer) and Home/End navigate within the current line The series also includes test infrastructure improvements, fixes a memory leak in expo text object destruction, and fixes a buildman bug with merge_config.sh path resolution when using work directories. Simon Glass (19): buildman: Fix merge_config.sh path when using work directories buildman: Add option to build then show summary test: Add ut_check_video() helper function test: Add video_compress_fb_() with message parameter test: Display message at top right during video test delay expo: Free gen.lines alist when destroying text objects expo: Read all available input to keep up with key repeat input: Add Ctrl+arrow key support for sandbox SDL console input: Add Home and End key support for sandbox SDL console input: Add Ctrl+Shift+Z support for redo cli: Add a Kconfig for enhanced editing cmd: editenv: Add -e flag for expo-based editing test: Add editenv test for init/poll/uninit functions expo: Convert BKEY_UP/DOWN to control characters for text input cli: Add Ctrl+Left/Right arrow support for word navigation expo: Add SCENEOF_MULTILINE flag for textedit cli: Make Ctrl+K clear to end of line in multiline mode cli: Add Ctrl+Y to yank killed text cli: Add multi-level undo/redo support arch/sandbox/dts/cros-ec-keyboard.dtsi | 4 + boot/Kconfig | 9 + boot/Makefile | 1 + boot/editenv.c | 193 +++++++++++++++++++ boot/expo.c | 6 +- boot/scene.c | 2 + boot/scene_txtin.c | 73 ++++++- cmd/Kconfig | 47 ++++- cmd/nvedit.c | 50 ++++- common/Makefile | 1 + common/cli_getch.c | 40 ++++ common/cli_readline.c | 239 +++++++++++++++++++++-- common/cli_undo.c | 251 ++++++++++++++++++++++++ doc/develop/expo.rst | 21 ++ doc/usage/cmdline.rst | 68 +++++++ drivers/input/input.c | 54 ++++++ include/cli.h | 230 +++++++++++++++++++++- include/expo.h | 66 +++++++ include/test/test.h | 5 + include/test/video.h | 12 ++ test/boot/Makefile | 1 + test/boot/editenv.c | 253 +++++++++++++++++++++++++ test/boot/expo.c | 63 +++++- test/dm/video.c | 139 +++++++++++++- test/test-main.c | 2 + tools/buildman/buildman.rst | 5 +- tools/buildman/cfgutil.py | 21 +- tools/buildman/cmdline.py | 2 + tools/buildman/control.py | 4 + tools/buildman/test.py | 110 +++++++++++ tools/buildman/test_cfgutil.py | 48 +++++ 31 files changed, 1954 insertions(+), 66 deletions(-) create mode 100644 boot/editenv.c create mode 100644 common/cli_undo.c create mode 100644 test/boot/editenv.c