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

This commit is contained in:
OpeOginni 2025-12-24 01:11:48 +01:00 committed by GitHub
parent 9898fbe8ef
commit 2806f240ea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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