Skip to content

fix: emit INPUT event for all mutating edit actions in InputRenderable#664

Merged
kitlangton merged 3 commits intomainfrom
kitlangton/ctrl-w-input-event
Feb 10, 2026
Merged

fix: emit INPUT event for all mutating edit actions in InputRenderable#664
kitlangton merged 3 commits intomainfrom
kitlangton/ctrl-w-input-event

Conversation

@kitlangton
Copy link
Collaborator

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

InputRenderable.deleteWordBackward() (inherited from Textarea) mutates
the buffer but never emits INPUT, so consumers like DialogSelect never
see the value change.
Override deleteWordBackward, deleteWordForward, deleteToLineStart,
deleteToLineEnd, undo, and redo to emit INPUT after the super call,
matching the existing pattern for deleteCharBackward and deleteChar.

Fixes Ctrl+W / Alt+Backspace not updating search results in TUI
dialog filters (e.g. model picker, skill picker).
@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 10, 2026

@opentui/core

npm i https://pkg.pr.new/anomalyco/opentui/@opentui/core@7ef9699

@opentui/react

npm i https://pkg.pr.new/anomalyco/opentui/@opentui/react@7ef9699

@opentui/solid

npm i https://pkg.pr.new/anomalyco/opentui/@opentui/solid@7ef9699

@opentui/core-darwin-arm64

npm i https://pkg.pr.new/anomalyco/opentui/@opentui/core-darwin-arm64@7ef9699

@opentui/core-darwin-x64

npm i https://pkg.pr.new/anomalyco/opentui/@opentui/core-darwin-x64@7ef9699

@opentui/core-linux-arm64

npm i https://pkg.pr.new/anomalyco/opentui/@opentui/core-linux-arm64@7ef9699

@opentui/core-linux-x64

npm i https://pkg.pr.new/anomalyco/opentui/@opentui/core-linux-x64@7ef9699

@opentui/core-win32-arm64

npm i https://pkg.pr.new/anomalyco/opentui/@opentui/core-win32-arm64@7ef9699

@opentui/core-win32-x64

npm i https://pkg.pr.new/anomalyco/opentui/@opentui/core-win32-x64@7ef9699

commit: 7ef9699

Copy link
Collaborator

@simonklee simonklee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we also missing deleteLine for Ctrl+Shift+D?

Covers the Ctrl+Shift+D (delete-line) action that was also missing
INPUT event emission.
@kitlangton
Copy link
Collaborator Author

Are we also missing deleteLine for Ctrl+Shift+D?

Indeed! Fixed :)

@kitlangton kitlangton marked this pull request as ready for review February 10, 2026 19:53
Copy link
Collaborator

@simonklee simonklee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this looks good. Tests passed locally and didn't find anything other than the missing event.

@kitlangton kitlangton merged commit 318194a into main Feb 10, 2026
16 checks passed
@kitlangton kitlangton deleted the kitlangton/ctrl-w-input-event branch February 10, 2026 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants