mirror of
https://github.com/lowobservable/oec.git
synced 2026-01-29 05:10:53 +00:00
Refactor VT100 _apply for consistency
This commit is contained in:
13
oec/vt100.py
13
oec/vt100.py
@@ -181,15 +181,12 @@ class VT100Session(Session):
|
||||
|
||||
self.vt100_stream.feed(data)
|
||||
|
||||
self._apply(self.vt100_screen)
|
||||
|
||||
self.vt100_screen.dirty.clear()
|
||||
|
||||
self._apply()
|
||||
self._flush()
|
||||
|
||||
def _apply(self, screen):
|
||||
for row in screen.dirty:
|
||||
row_buffer = screen.buffer[row]
|
||||
def _apply(self):
|
||||
for row in self.vt100_screen.dirty:
|
||||
row_buffer = self.vt100_screen.buffer[row]
|
||||
|
||||
for column in range(self.terminal.display.dimensions.columns):
|
||||
character = row_buffer[column]
|
||||
@@ -199,6 +196,8 @@ class VT100Session(Session):
|
||||
|
||||
self.terminal.display.buffered_write(byte, row=row, column=column)
|
||||
|
||||
self.vt100_screen.dirty.clear()
|
||||
|
||||
def _flush(self):
|
||||
self.terminal.display.flush()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user