Update ptyDriver.py

This commit is contained in:
chrys87 2018-05-29 14:04:26 +02:00 committed by GitHub
parent c00fc9ea35
commit 3140abde00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -33,11 +33,11 @@ class Terminal:
self.screen.cursor.x = min(self.screen.cursor.x, self.screen.columns - 1) 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) self.screen.cursor.y = min(self.screen.cursor.y, self.screen.lines - 1)
def dump(self): def dump(self):
self.screen.dirty.clear()
cursor = self.screen.cursor cursor = self.screen.cursor
text = '\n'.join(self.screen.display) text = '\n'.join(self.screen.display)
buffer = self.screen.buffer buffer = self.screen.buffer
attributes = [[list(attribute[1:]) + [False, 'default', 'default'] for attribute in line.values()] for line in buffer.values()] 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), return {"cursor": (cursor.x, cursor.y),
'lines': self.screen.lines, 'lines': self.screen.lines,
'columns': self.screen.columns, 'columns': self.screen.columns,