From c806f18698660232d49be0d58f3a5454800af02d Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Fri, 9 May 2025 10:04:08 -0700 Subject: [PATCH] fix: Show cursor on KeyboardInterrupt exit --- aider/coders/base_coder.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/aider/coders/base_coder.py b/aider/coders/base_coder.py index ab59600cf..95b450a8a 100755 --- a/aider/coders/base_coder.py +++ b/aider/coders/base_coder.py @@ -23,6 +23,7 @@ try: except ImportError: # Babel not installed – we will fall back to a small mapping Locale = None from json.decoder import JSONDecodeError +from rich.console import Console from pathlib import Path from typing import List @@ -981,6 +982,8 @@ class Coder: 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()