fix: Add fallback terminal type for xterm-ghostty to resolve curses initialization error
This commit is contained in:
parent
31d6e0ef55
commit
2192cf4207
4
gtm
4
gtm
|
|
@ -1585,6 +1585,10 @@ def main(stdscr, filename, show_add, show_del, mouse=True, no_diff=False, wrap_l
|
|||
pass
|
||||
|
||||
if __name__ == "__main__":
|
||||
# Set a fallback terminal type if the current one isn't recognized
|
||||
if os.environ.get("TERM") in ["xterm-ghostty", "unknown"]:
|
||||
os.environ["TERM"] = "xterm-256color"
|
||||
|
||||
parser = argparse.ArgumentParser(description="A \"Git Time Machine\" for viewing file history")
|
||||
parser.add_argument("--no-diff", action="store_true", help="Don't highlight added and deleted lines")
|
||||
parser.add_argument("--no-mouse", action="store_true", help="Disable mouse support")
|
||||
|
|
|
|||
Loading…
Reference in New Issue