fix: resize textarea when pasting prompt less than 150 chars (#6070)

thinking-toggle-wip
OpeOginni 2025-12-24 01:11:48 +01:00 committed by Aiden Cline
parent 1f2a4537bc
commit 466ed745ab
1 changed files with 7 additions and 0 deletions

View File

@ -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