Handle 'no input' errors on t.getkey()
1 files changed, 8 insertions(+), 1 deletions(-)

M check.py
M check.py +8 -1
@@ 244,7 244,14 @@ def run(t, styles, tasks):
     }
     view(state, t, styles)
     while True:
-        key = t.getkey()  # Wait for the next keypress...
+        try:
+            key = t.getkey()  # Wait for the next keypress...
+        except Exception as e:
+            if e.args[0] == 'no input':
+                # This error is raised when I press e.g. Win+Left and the
+                # window manager moves the terminal window. Ignore it.
+                continue
+            raise
         state = update(state, key)  # ...update state based on the key...
         view(state, t, styles)  # ...render the new state...
         state = autoupdate_state_no_rerender(state) # ...and do housekeeping.