mirror of
https://github.com/lowobservable/oec.git
synced 2026-01-27 20:47:18 +00:00
Fix issue where entire screen was cleared by VT100 session erasing status line set by controller
This commit is contained in:
@@ -80,7 +80,7 @@ class Controller:
|
||||
|
||||
self.logger.info(f'Rows = {rows}, Columns = {columns}, Keymap = {keymap_name}')
|
||||
|
||||
self.terminal.display.clear_screen()
|
||||
self.terminal.display.clear_screen(include_status_line=True)
|
||||
|
||||
# Show the attached indicator on the status line.
|
||||
self.terminal.display.status_line.write_string(0, 'S')
|
||||
|
||||
@@ -179,11 +179,18 @@ class Display:
|
||||
|
||||
self.address_counter = address
|
||||
|
||||
def clear_screen(self):
|
||||
"""Clear the screen - including the status line."""
|
||||
def clear_screen(self, include_status_line=False):
|
||||
"""Clear the screen."""
|
||||
(rows, columns) = self.dimensions
|
||||
|
||||
self.interface.offload_write(b'\x00', address=0, repeat=((rows+1)*columns)-1)
|
||||
if include_status_line:
|
||||
address = 0
|
||||
repeat = ((rows + 1) * columns) - 1
|
||||
else:
|
||||
address = columns
|
||||
repeat = (rows * columns) - 1
|
||||
|
||||
self.interface.offload_write(b'\x00', address=address, repeat=repeat)
|
||||
|
||||
# Update the buffer and dirty indicators to reflect the cleared screen.
|
||||
for index in range(rows * columns):
|
||||
|
||||
Reference in New Issue
Block a user