summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx7
1 files changed, 7 insertions, 0 deletions
diff --git a/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx b/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx
index 18384f65e..8972ba36e 100644
--- a/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx
+++ b/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx
@@ -930,6 +930,13 @@ export function Prompt(props: PromptProps) {
pasteText(pastedContent, `[Pasted ~${lineCount} lines]`)
return
}
+
+ // Force layout update and render for the pasted content
+ setTimeout(() => {
+ input.getLayoutNode().markDirty()
+ input.gotoBufferEnd()
+ renderer.requestRender()
+ }, 0)
}}
ref={(r: TextareaRenderable) => {
input = r