mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
2b7cef952b
commit
a0c0a3ffbb
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user