Route bracketed-paste text to the focused input#63
Merged
Merged
Conversation
The terminal delivers pasted text as a single tea.PasteMsg, but Update only routed KeyPressMsg, so pastes were silently discarded before any widget saw them — no input in the app could be pasted into. handlePaste now mirrors handleKey's precedence (editor, favorites inputs, query console, mapping form, search inputs) and forwards the message to whichever input owns the keyboard; the textinput/textarea widgets already knew how to insert it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CS2LZMn2YJdebAiry2jzdP
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.
Pasting into any input (prefix/member/locate filters, jq console, favorites note/pattern, mapping form, record editor) did nothing: Bubble Tea delivers a paste as one
tea.PasteMsg(bracketed paste is on by default), butModel.Updateonly routedtea.KeyPressMsg, so the message died in thedefaultarm before any widget saw it. The bubbles textinput/textarea widgets already handletea.PasteMsgnatively.handlePasteforwards the message to whichever input owns the keyboard, mirroringhandleKey's precedence order (editor → favorites inputs → query console → mapping form → search inputs), including the editor's pending-nav flush and the query console's completion refresh; pastes with nothing focused are dropped.Verified with unit tests for the search input (insert-at-cursor), query console, favorites pattern input, and the nothing-focused/list-mode drop cases — plus a real bracketed paste through tmux (
paste-buffer -p) landing in the prefix input of the live TUI.🤖 Generated with Claude Code
https://claude.ai/code/session_01CS2LZMn2YJdebAiry2jzdP