Skip to content

Commit 1306b48

Browse files
fix: correct Ctrl+C detection in terminal UI
Changed from checking ord_c == 67 ('C') to ord_c == 3 (Ctrl+C control character)
1 parent 03730d3 commit 1306b48

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

python_search/search/search_ui/terminal_ui.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,8 @@ def process_chars(self, c: str) -> bool:
371371
self.scroll_offset = 0
372372
# Reset query history browsing when clearing query
373373
self.query_history_index = -1
374-
elif ord_c == 67:
374+
elif ord_c == 3:
375+
# Ctrl+C - exit
375376
sys.exit(0)
376377
elif ord_c == 92 or c == "]":
377378
self._setup_entries()

0 commit comments

Comments
 (0)