mirror of
https://github.com/anomalyco/opencode.git
synced 2026-07-10 02:18:29 +00:00
fix: resize textarea when pasting prompt less than 150 chars (#6070)
This commit is contained in:
parent
9898fbe8ef
commit
2806f240ea
1 changed files with 7 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue