From 2143731f6efdf1aafff38ec249caf01a8bcd163e Mon Sep 17 00:00:00 2001
From: Jacob Richman <jacob314@gmail.com>
Date: Tue, 19 Aug 2025 13:41:08 -0700
Subject: fix(paste) incorrect handling of \\\n in pastes (#6532)

---
 packages/cli/src/ui/components/InputPrompt.tsx | 6 ++++++
 1 file changed, 6 insertions(+)

(limited to 'packages/cli/src/ui/components/InputPrompt.tsx')

diff --git a/packages/cli/src/ui/components/InputPrompt.tsx b/packages/cli/src/ui/components/InputPrompt.tsx
index dcfdace3..99a59c34 100644
--- a/packages/cli/src/ui/components/InputPrompt.tsx
+++ b/packages/cli/src/ui/components/InputPrompt.tsx
@@ -239,6 +239,12 @@ export const InputPrompt: React.FC<InputPromptProps> = ({
         return;
       }
 
+      if (key.paste) {
+        // Ensure we never accidentally interpret paste as regular input.
+        buffer.handleInput(key);
+        return;
+      }
+
       if (vimHandleInput && vimHandleInput(key)) {
         return;
       }
-- 
cgit v1.2.3

