diff --git a/previewer/__init__.py b/previewer/__init__.py index e7d0fc8..670ef5d 100644 --- a/previewer/__init__.py +++ b/previewer/__init__.py @@ -169,6 +169,8 @@ def run(self): while True: try: code, assign, do_preview = self.exec_conn.recv() + while self.exec_conn.poll(): # take only latest + code, assign, do_preview = self.exec_conn.recv() # unmask ctrl+c signal.signal(signal.SIGINT, signal.default_int_handler) ctrl_c_timer = threading.Timer(CTRL_C_TIMEOUT, self.ctrl_c)