From 985cf473cc8d4a2fcd2dccea9f95f5a36f6cca81 Mon Sep 17 00:00:00 2001 From: "n loewen (aider)" Date: Sun, 8 Jun 2025 10:21:45 +0100 Subject: [PATCH] feat: Add explicit mouse support option and ensure mouse mode is enabled by default --- gtm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gtm b/gtm index 1ccda4c..a15fd21 100755 --- a/gtm +++ b/gtm @@ -1536,6 +1536,7 @@ if __name__ == "__main__": parser.add_argument("--diff-additions", action="store_true", help="Highlight newly added lines in green") parser.add_argument("--diff-deletions", action="store_true", help="Show deleted lines in red") parser.add_argument("--no-mouse", action="store_true", help="Disable mouse support") + parser.add_argument("--mouse", action="store_true", help="Enable mouse support (default)") parser.add_argument("--no-wrap", action="store_true", help="Disable line wrapping") parser.add_argument("--line-numbers", action="store_true", help="Show line numbers") parser.add_argument("-v", "--version", action="store_true", help="Show version number") @@ -1564,4 +1565,6 @@ if __name__ == "__main__": print(f" git commit -m 'Add {os.path.basename(filename)}'") sys.exit(1) - curses.wrapper(main, filename, args.diff, args.diff_additions, args.diff_deletions, not args.no_mouse, not args.no_wrap, args.line_numbers) + # Ensure mouse is enabled by default, only disable if --no-mouse is explicitly set + mouse_enabled = not args.no_mouse + curses.wrapper(main, filename, args.diff, args.diff_additions, args.diff_deletions, mouse_enabled, not args.no_wrap, args.line_numbers)