Skip to content

Commit 7f3b2ca

Browse files
committed
Add newline before completion marker so it doesn't overlap response
The response text has no trailing newline after markdown trim, so the checkmark was printing on the same line as the last word of the reply. Add Print(newline) in finish() and fail() so they always start on a fresh line.
1 parent 1b8508c commit 7f3b2ca

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

rust/crates/rusty-claude-cli/src/render.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,10 +259,11 @@ impl Spinner {
259259
out: &mut impl Write,
260260
) -> io::Result<()> {
261261
self.stop_animation();
262-
// Print done message on a new line — don't clear the current line
263-
// because it may contain the last line of the AI response.
262+
// Newline first so the ✔ never lands on the same line as the
263+
// AI response text (which has no trailing newline after trim).
264264
execute!(
265265
out,
266+
Print("\n"),
266267
SetForegroundColor(theme.spinner_done),
267268
Print(format!("✔ {label}\n")),
268269
ResetColor
@@ -279,6 +280,7 @@ impl Spinner {
279280
self.stop_animation();
280281
execute!(
281282
out,
283+
Print("\n"),
282284
SetForegroundColor(theme.spinner_failed),
283285
Print(format!("✘ {label}\n")),
284286
ResetColor

0 commit comments

Comments
 (0)