Skip to content

Commit 5cf2e56

Browse files
committed
Input rendering on new line fix
1 parent e95b13d commit 5cf2e56

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/subcommands/chat/react/inputRenderer.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ export function renderInputWithCursor({
2020
pasteRanges,
2121
lineStartPos,
2222
}: RenderInputWithCursorOpts): JSX.Element {
23+
if (fullText.length === 0 && cursorPosition === 0) {
24+
return <>{chalk.inverse(" ")}</>;
25+
}
26+
2327
return (
2428
<Transform
2529
transform={output => {
@@ -41,7 +45,6 @@ export function renderInputWithCursor({
4145
}
4246
}
4347
}
44-
4548
if (cursorPosition === output.length) {
4649
result += chalk.inverse(" ");
4750
}

0 commit comments

Comments
 (0)