From 95cc362c074155f00cf3c84f4a392a9ff0b0b935 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Thu, 8 May 2025 17:12:28 -0700 Subject: [PATCH] fix: Fix spinner backspace calculation --- aider/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aider/utils.py b/aider/utils.py index 2eb12d200..42c6ac0f1 100644 --- a/aider/utils.py +++ b/aider/utils.py @@ -337,7 +337,7 @@ class Spinner: # Backspace cursor to the scanner character pos_in_content = frame.find(self.scan_char) - 1 # exclude '[' chars_after_scanner = (self.width - 1) - pos_in_content - num_backspaces = max(0, chars_after_scanner + 2) # +']' and extra + num_backspaces = max(0, chars_after_scanner + 2) + len(self.text) + 1 sys.stdout.write("\b" * num_backspaces) sys.stdout.flush()