@@ 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.