summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorOpeOginni <[email protected]>2025-12-24 01:11:48 +0100
committerGitHub <[email protected]>2025-12-23 18:11:48 -0600
commit2806f240ea0ae56d5f46f6e7e377e9d732ad47d5 (patch)
treed1cbf8cb9d0062bca87621470f25c9a08e88c5c5
parent9898fbe8ef7584002691e1e9b6d6da4b526caa63 (diff)
downloadopencode-2806f240ea0ae56d5f46f6e7e377e9d732ad47d5.tar.gz
opencode-2806f240ea0ae56d5f46f6e7e377e9d732ad47d5.zip
fix: resize textarea when pasting prompt less than 150 chars (#6070)
-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