mirror of
https://github.com/lowobservable/oec.git
synced 2026-05-03 22:49:24 +00:00
Refactor session
This commit is contained in:
@@ -126,9 +126,6 @@ class VT100Session(Session):
|
||||
|
||||
self.vt100_stream.feed(data)
|
||||
|
||||
self._apply()
|
||||
self._flush()
|
||||
|
||||
return True
|
||||
|
||||
def handle_key(self, key, keyboard_modifiers, scan_code):
|
||||
@@ -139,6 +136,10 @@ class VT100Session(Session):
|
||||
|
||||
self.host_process.write(bytes_)
|
||||
|
||||
def render(self):
|
||||
self._apply()
|
||||
self._flush()
|
||||
|
||||
def _map_key(self, key, keyboard_modifiers):
|
||||
if keyboard_modifiers.is_alt():
|
||||
# Ignore any modifiers... this would fall through and result in a warning
|
||||
@@ -204,8 +205,6 @@ class VT100Session(Session):
|
||||
def _flush(self):
|
||||
self.terminal.display.flush()
|
||||
|
||||
# TODO: Investigate different approaches to making cursor syncronization more
|
||||
# reliable - maybe it needs to be forced sometimes.
|
||||
cursor = self.vt100_screen.cursor
|
||||
|
||||
if cursor.y < self.terminal.display.dimensions.rows and cursor.x < self.terminal.display.dimensions.columns:
|
||||
|
||||
Reference in New Issue
Block a user