Store length of history list requested in every case

This commit is contained in:
Kristóf Tóth 2018-03-03 23:02:49 +01:00
parent cc964fdf27
commit ab76e3d024

View File

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