diff --git a/gtm b/gtm index dc9d8a6..69787b6 100755 --- a/gtm +++ b/gtm @@ -177,9 +177,6 @@ def load_commit_content(state: AppState) -> AppState: def update_dimensions(state: AppState, height: int, width: int) -> AppState: return replace(state, height=height, width=width) -def toggle_mouse(state: AppState) -> AppState: - return replace(state, enable_mouse=not state.enable_mouse) - def toggle_sidebar(state: AppState) -> AppState: new_show_sidebar = not state.show_sidebar new_focus = state.focus @@ -591,8 +588,6 @@ def handle_keyboard_input(key, state: AppState) -> AppState: return replace(state, is_selecting=False, selection_start_coord=None, selection_end_coord=None) else: return replace(state, should_exit=True) - elif key == ord('m'): - return toggle_mouse(state) elif key == ord('s'): return toggle_sidebar(state) elif key in [curses.KEY_LEFT, ord('h')]: @@ -667,8 +662,6 @@ def main(stdscr, filename, show_diff, show_add, show_del, mouse): try: key = stdscr.getch() - old_mouse_enabled = state.enable_mouse - # Process input and update the application state if key == -1: # No input available (timeout) pass # Just redraw the UI and continue @@ -680,12 +673,6 @@ def main(stdscr, filename, show_diff, show_add, show_del, mouse): else: state = handle_keyboard_input(key, state) - if old_mouse_enabled != state.enable_mouse: - if state.enable_mouse: - curses.mousemask(curses.ALL_MOUSE_EVENTS | curses.REPORT_MOUSE_POSITION) - else: - curses.mousemask(0) - # After every action, redraw the UI to reflect changes immediately. # This is crucial for real-time feedback during mouse drags. draw_ui(stdscr, state)