From 2819a4ebf31fb79cd0801e9d999a7a402cc804f6 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 10 May 2018 09:53:17 +0530 Subject: [PATCH] ... --- kitty/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kitty/utils.py b/kitty/utils.py index da3450a6e..bd69b808e 100644 --- a/kitty/utils.py +++ b/kitty/utils.py @@ -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