From bf5dd26e59741737bd359739249a67a304e4f1ef Mon Sep 17 00:00:00 2001 From: Kieran Klukas Date: Mon, 11 May 2026 17:00:01 -0400 Subject: [PATCH] fix(paste): normalize windows newlines --- internal/ui/model/ui.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/ui/model/ui.go b/internal/ui/model/ui.go index 62b82a0bba9eafd41cdfc76ad23228e75f51a24f..fbc0eca985c71373e3a26a0008287437e203e759 100644 --- a/internal/ui/model/ui.go +++ b/internal/ui/model/ui.go @@ -3462,6 +3462,9 @@ func (m *UI) newSession() tea.Cmd { // handlePasteMsg handles a paste message. func (m *UI) handlePasteMsg(msg tea.PasteMsg) tea.Cmd { + // Normalize \r\n before the textarea sanitizer sees it. + msg.Content = strings.ReplaceAll(msg.Content, "\r\n", "\n") + if m.dialog.HasDialogs() { return m.handleDialogMsg(msg) }