feat: Add explicit mouse support option and ensure mouse mode is enabled by default
This commit is contained in:
parent
b5336bcd2a
commit
985cf473cc
5
gtm
5
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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue