feat: Modify Escape key behavior to clear search results instead of exiting

This commit is contained in:
n loewen (aider) 2025-06-08 10:13:17 +01:00
parent b942954620
commit b25bf2d16a
1 changed files with 2 additions and 2 deletions

4
gtm
View File

@ -1347,8 +1347,8 @@ def handle_keyboard_input(key, state: AppState) -> AppState:
return replace(state, show_help=False) return replace(state, show_help=False)
elif state.is_selecting: elif state.is_selecting:
return replace(state, is_selecting=False, selection_start_coord=None, selection_end_coord=None) return replace(state, is_selecting=False, selection_start_coord=None, selection_end_coord=None)
else: elif state.search_matches: # Clear active search results
return replace(state, should_exit=True) return replace(state, search_matches=[], current_match_idx=-1)
elif key == ord('?'): # Toggle help popup elif key == ord('?'): # Toggle help popup
return replace(state, show_help=not state.show_help) return replace(state, show_help=not state.show_help)
elif key == ord('/'): # Start search elif key == ord('/'): # Start search