From afe24757d992474f65768b59f29eaca276c66547 Mon Sep 17 00:00:00 2001 From: leafx54 Date: Tue, 26 May 2026 03:10:57 -0400 Subject: [PATCH] fix: handle paste events in pair and rename inputs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PasteMsg is a distinct message type in Bubbletea v2 — it never routes through KeyPressMsg, so Cmd+V was silently dropped. Add a PasteMsg case in Update that appends to pairInput or renameInput when the respective mode is active, filtering non-printable characters. Fixes: p key pair input, r rename input both now accept paste. --- internal/screens/connections.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/internal/screens/connections.go b/internal/screens/connections.go index edee6a4..f6585d3 100644 --- a/internal/screens/connections.go +++ b/internal/screens/connections.go @@ -92,6 +92,20 @@ func (c Connections) Update(msg tea.Msg) (Screen, tea.Cmd) { case tea.KeyPressMsg: return c.handleKey(msg) + + case tea.PasteMsg: + text := strings.Map(func(r rune) rune { + if unicode.IsPrint(r) { + return r + } + return -1 + }, msg.Content) + if c.pairing { + c.pairInput += text + } else if c.renaming { + c.renameInput += text + } + return c, nil } return c, nil }