From 1b2eeaff56d016f633bc2187ae34c56ad52af2c8 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Fri, 9 May 2025 10:05:56 -0700 Subject: [PATCH] fix: Ensure cursor is shown on first Ctrl+C --- aider/coders/base_coder.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/aider/coders/base_coder.py b/aider/coders/base_coder.py index f0873a922..fc40d818e 100755 --- a/aider/coders/base_coder.py +++ b/aider/coders/base_coder.py @@ -978,13 +978,14 @@ class Coder: return inp def keyboard_interrupt(self): + # Ensure cursor is visible on exit + Console().show_cursor(True) + now = time.time() thresh = 2 # seconds if self.last_keyboard_interrupt and now - self.last_keyboard_interrupt < thresh: self.io.tool_warning("\n\n^C KeyboardInterrupt") - # Ensure cursor is visible on exit - Console().show_cursor(True) self.event("exit", reason="Control-C") sys.exit()