From ab76e3d024d1765973d36fd6e8fdc607ae9ad020 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Sat, 3 Mar 2018 23:02:49 +0100 Subject: [PATCH] Store length of history list requested in every case --- lib/tfw/components/terminado_event_handler.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/tfw/components/terminado_event_handler.py b/lib/tfw/components/terminado_event_handler.py index 9ae7dae..9368f34 100644 --- a/lib/tfw/components/terminado_event_handler.py +++ b/lib/tfw/components/terminado_event_handler.py @@ -27,5 +27,6 @@ class TerminadoEventHandler(TriggerlessEventHandler): self.terminado_server.pty.write(data['shellcmd']) def read(self, data): - data['history'] = self.monitor.history[-int(data.get('count', 1)):] + data['count'] = int(data.get('count', 1)) + data['history'] = self.monitor.history[-data['count']:] return data