damn, we get not all information from pyte... we need to work arround this

This commit is contained in:
chrys
2018-05-27 23:25:38 +02:00
parent a334139902
commit 2dd92b7c68
2 changed files with 22 additions and 14 deletions

View File

@ -33,16 +33,16 @@ class Terminal:
self.screen.cursor.x = min(self.screen.cursor.x, self.screen.columns - 1)
self.screen.cursor.y = min(self.screen.cursor.y, self.screen.lines - 1)
def dump(self):
self.screen.dirty.clear()
cursor = self.screen.cursor
text = '\n'.join(self.screen.display)
buffer = self.screen.buffer
attributes = [[list(attribute[1:]) + [False, 'default', 'default'] for attribute in line.values()] for line in buffer.values()]
self.screen.dirty.clear()
return {"cursor": (cursor.x, cursor.y),
'lines': self.screen.lines,
'columns': self.screen.columns,
"text": text,
'attributes': attributes,
'attributes': attributes.copy(),
'screen': 'pty'
}.copy()