mirror of
https://github.com/kovidgoyal/calibre.git
synced 2026-05-20 14:12:20 -04:00
...
This commit is contained in:
@@ -330,7 +330,7 @@ def get_term_geometry():
|
||||
|
||||
def ioctl_GWINSZ(fd):
|
||||
try:
|
||||
return struct.unpack(b'hh', fcntl.ioctl(fd, termios.TIOCGWINSZ, b'1234'))
|
||||
return struct.unpack(b'HHHH', fcntl.ioctl(fd, termios.TIOCGWINSZ, b'\0'*8))[:2]
|
||||
except Exception:
|
||||
return None, None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user