We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents f142fa4 + c7dd640 commit a489e2dCopy full SHA for a489e2d
1 file changed
src/ui/PromptInput.tsx
@@ -411,7 +411,9 @@ export const PromptInput = React.memo(function PromptInput({
411
}
412
413
if (input && !key.ctrl && !key.meta) {
414
- const sanitized = input.replace(/\r/g, "");
+ // Normalize line endings from paste: \r\n (Windows) → \n, \r (old macOS/Enter) → \n.
415
+ // This preserves multi-line formatting when the user pastes content.
416
+ const sanitized = input.replace(/\r\n/g, "\n").replace(/\r/g, "\n");
417
updateBuffer((s) => insertText(s, sanitized));
418
419
},
0 commit comments