...
This commit is contained in:
parent
dec1203ea8
commit
2819a4ebf3
1 changed files with 1 additions and 1 deletions
|
|
@ -92,7 +92,7 @@ def screen_size():
|
|||
buf = array.array('H', [0, 0, 0, 0])
|
||||
fcntl.ioctl(sys.stdout, termios.TIOCGWINSZ, buf)
|
||||
rows, cols, width, height = tuple(buf)
|
||||
cell_width, cell_height = width // cols, height // rows
|
||||
cell_width, cell_height = width // (cols or 1), height // (rows or 1)
|
||||
screen_size.ans = Size(rows, cols, width, height, cell_width, cell_height)
|
||||
screen_size.changed = False
|
||||
return screen_size.ans
|
||||
|
|
|
|||
Loading…
Reference in a new issue