Conversation
Ctrl+Backspace did nothing in the composer. The word-delete branch matched Alt+Backspace or Ctrl+W only, and the plain-backspace branch rejects any ctrl, so a modified Backspace fell through every handler. OpenTUI already reports it as backspace+ctrl (CSI 127;5u) once the kitty keyboard protocol is active, which the CLI pushes at startup — the only missing piece was the binding. opentui's own EditBuffer ships the same binding, so this matches the framework's default.
Contributor
|
Good, minimal fix. The diagnosis is correct: the word-delete branch only checked A couple of things worth double-checking before this lands upstream:
Substance is sound and the diff is small enough to review in seconds. Flagging as needs-work only for the missing test coverage, not the fix itself — happy to see this ported as-is if the maintainers don't consider a test necessary for a two-line key-matching change. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ctrl+Backspace now deletes a word in the composer. Before, it did nothing.
This is muscle memory: in a terminal, Ctrl+Backspace is what people reach for to delete a word, and other coding agents (opencode, hermes, and most terminal UIs) already do it. Here Ctrl+W was the only way.
The change is two lines in
cli/src/components/multiline-input.tsx. The word-delete branch matchedAlt+BackspaceorCtrl+W, and the plain-Backspace branch ignores any ctrl, so Ctrl+Backspace fell through both. It now matches:That's all — the key already arrives from OpenTUI as Ctrl+Backspace, so only the check was missing. Alt+Backspace, Ctrl+W, and plain Backspace behave exactly as before.
One limit: on terminals that send Ctrl+Backspace in a way that can't be told apart from a plain Backspace, it still deletes one character. Nothing to do about that.
Overlaps #1225 and #1182, which touch the same handlers; neither adds this binding.