From c899711e69b46a01bf9a4aa5724ca98fbac06f56 Mon Sep 17 00:00:00 2001 From: stackxp Date: Thu, 11 Dec 2025 18:10:51 +0100 Subject: [PATCH] I love git lol --- copyparty/util.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/copyparty/util.py b/copyparty/util.py index 7290dd9e..9ea8819f 100644 --- a/copyparty/util.py +++ b/copyparty/util.py @@ -4175,7 +4175,12 @@ def wrap(txt: str, maxlen: int, maxlen2: int) -> list[str]: def termsize() -> tuple[int, int]: - # from hashwalk + try: + w, h = os.get_terminal_size() + return w, h + except: + pass + env = os.environ def ioctl_GWINSZ(fd: int) -> Optional[tuple[int, int]]: @@ -4442,4 +4447,4 @@ __all__ = [ "JINJA_VER", "PYFTPD_VER", "PARTFTPY_VER", -] +] \ No newline at end of file