mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 01:35:00 +00:00
fix: Show cursor on KeyboardInterrupt exit
This commit is contained in:
parent
91d7fbd659
commit
c806f18698
1 changed files with 3 additions and 0 deletions
|
@ -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()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue