[PR #601] [MERGED] textarea: align ctrl+a defaults and tests with platform behavior #1428

Closed
opened 2026-03-14 09:36:18 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opentui/pull/601
Author: @simonklee
Created: 1/28/2026
Status: Merged
Merged: 1/30/2026
Merged by: @kommander

Base: mainHead: fix-testarea


📝 Commits (3)

  • d4ec325 textarea: keep ctrl+a bound to line-home
  • 4ecf1b0 textarea: align ctrl+a defaults and tests with platform behavior
  • 010b1a2 Revert "textarea: align ctrl+a defaults and tests with platform behavior"

📊 Changes

1 file changed (+1 additions, -10 deletions)

View changed files

📝 packages/core/src/renderables/Textarea.ts (+1 -10)

📄 Description

Remove the redundant ctrl+a line-home default entry (the platform block
already handles line-home on macOS and select-all elsewhere). Update
Input/Textarea ctrl+a assertions to branch on process.platform and keep
follow-up expectations stable by clearing selection.

This fixes 4 test failures on linux/windows where ctrl+a was expected
to move to line start but instead selected all text.

> bun run test

...

4 tests failed:
✗ InputRenderable > Key Bindings and Aliases > should support Emacs-style bindings by default [1.00ms]
✗ Textarea - Keybinding Tests > Selection with ctrl+shift+a/e (line home/end) > should not interfere with ctrl+a (without shift) [2.00ms]
✗ Textarea - Keybinding Tests > Visual line navigation with meta+a/e > should differ from ctrl+a/e when wrapping is enabled [1.00ms]
✗ Textarea - Editing Tests > Keyboard Input - Control Commands > should move to line start with Ctrl+A [2.00ms]

 3113 pass
 6 skip
 4 fail
 201 snapshots, 26814 expect() calls
Ran 3123 tests across 86 files. [64.20s]
error: script "test:js" exited with code 1
error: script "test" exited with code 1

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/anomalyco/opentui/pull/601 **Author:** [@simonklee](https://github.com/simonklee) **Created:** 1/28/2026 **Status:** ✅ Merged **Merged:** 1/30/2026 **Merged by:** [@kommander](https://github.com/kommander) **Base:** `main` ← **Head:** `fix-testarea` --- ### 📝 Commits (3) - [`d4ec325`](https://github.com/anomalyco/opentui/commit/d4ec325640030b2cc0c19198f011599fa665fc22) textarea: keep ctrl+a bound to line-home - [`4ecf1b0`](https://github.com/anomalyco/opentui/commit/4ecf1b0ad405058781c8c8dba80a1339b819643d) textarea: align ctrl+a defaults and tests with platform behavior - [`010b1a2`](https://github.com/anomalyco/opentui/commit/010b1a20705319e0955dd84db123176e499da1cd) Revert "textarea: align ctrl+a defaults and tests with platform behavior" ### 📊 Changes **1 file changed** (+1 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `packages/core/src/renderables/Textarea.ts` (+1 -10) </details> ### 📄 Description Remove the redundant ctrl+a line-home default entry (the platform block already handles line-home on macOS and select-all elsewhere). Update Input/Textarea ctrl+a assertions to branch on process.platform and keep follow-up expectations stable by clearing selection. This fixes 4 test failures on linux/windows where ctrl+a was expected to move to line start but instead selected all text. ``` > bun run test ... 4 tests failed: ✗ InputRenderable > Key Bindings and Aliases > should support Emacs-style bindings by default [1.00ms] ✗ Textarea - Keybinding Tests > Selection with ctrl+shift+a/e (line home/end) > should not interfere with ctrl+a (without shift) [2.00ms] ✗ Textarea - Keybinding Tests > Visual line navigation with meta+a/e > should differ from ctrl+a/e when wrapping is enabled [1.00ms] ✗ Textarea - Editing Tests > Keyboard Input - Control Commands > should move to line start with Ctrl+A [2.00ms] 3113 pass 6 skip 4 fail 201 snapshots, 26814 expect() calls Ran 3123 tests across 86 files. [64.20s] error: script "test:js" exited with code 1 error: script "test" exited with code 1 ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-14 09:36:18 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/opentui#1428
No description provided.