[PR #664] [MERGED] fix: emit INPUT event for all mutating edit actions in InputRenderable #696

Closed
opened 2026-03-02 23:47:43 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opentui/pull/664
Author: @kitlangton
Created: 2/10/2026
Status: Merged
Merged: 2/10/2026
Merged by: @kitlangton

Base: mainHead: kitlangton/ctrl-w-input-event


📝 Commits (3)

  • 41e8388 add failing tests for Ctrl+W/Alt+Backspace not emitting INPUT event
  • c1a3f9a fix: emit INPUT event for all mutating edit actions in InputRenderable
  • 7ef9699 add deleteLine override and test to InputRenderable

📊 Changes

2 files changed (+95 additions, -0 deletions)

View changed files

📝 packages/core/src/renderables/Input.test.ts (+53 -0)
📝 packages/core/src/renderables/Input.ts (+42 -0)

📄 Description

InputRenderable now emits INPUT events for all text-mutating operations (Ctrl+W, Ctrl+U, Ctrl+K, undo/redo), not just single-character deletion. Fixes search filters in TUI dialogs that rely on onInput events.

Test plan

  • Two new tests verify Ctrl+W and Alt+Backspace emit INPUT events
  • All 49 existing Input tests pass

🔄 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/664 **Author:** [@kitlangton](https://github.com/kitlangton) **Created:** 2/10/2026 **Status:** ✅ Merged **Merged:** 2/10/2026 **Merged by:** [@kitlangton](https://github.com/kitlangton) **Base:** `main` ← **Head:** `kitlangton/ctrl-w-input-event` --- ### 📝 Commits (3) - [`41e8388`](https://github.com/anomalyco/opentui/commit/41e838852bcf1df8572e9aa75dd4032730041b8c) add failing tests for Ctrl+W/Alt+Backspace not emitting INPUT event - [`c1a3f9a`](https://github.com/anomalyco/opentui/commit/c1a3f9a51de4a270158c4994d15b82072c509313) fix: emit INPUT event for all mutating edit actions in InputRenderable - [`7ef9699`](https://github.com/anomalyco/opentui/commit/7ef9699cf66b4e55cdf5a8f9d0ef2f55917e1db4) add deleteLine override and test to InputRenderable ### 📊 Changes **2 files changed** (+95 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `packages/core/src/renderables/Input.test.ts` (+53 -0) 📝 `packages/core/src/renderables/Input.ts` (+42 -0) </details> ### 📄 Description InputRenderable now emits INPUT events for all text-mutating operations (Ctrl+W, Ctrl+U, Ctrl+K, undo/redo), not just single-character deletion. Fixes search filters in TUI dialogs that rely on onInput events. ## Test plan - Two new tests verify Ctrl+W and Alt+Backspace emit INPUT events - All 49 existing Input tests pass --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 23:47:43 +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#696
No description provided.