We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f4d892d commit 5731c26Copy full SHA for 5731c26
1 file changed
packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx
@@ -665,7 +665,11 @@ export function Prompt(props: PromptProps) {
665
return
666
}
667
668
- const pastedContent = event.text.trim()
+ // Normalize line endings at the boundary
669
+ // Windows ConPTY/Terminal often sends CR-only newlines in bracketed paste
670
+ // Replace CRLF first, then any remaining CR
671
+ const normalizedText = event.text.replace(/\r\n/g, "\n").replace(/\r/g, "\n")
672
+ const pastedContent = normalizedText.trim()
673
if (!pastedContent) {
674
command.trigger("prompt.paste")
675
0 commit comments