diff --git a/oec/controller.py b/oec/controller.py index 211f26c..a8585ab 100644 --- a/oec/controller.py +++ b/oec/controller.py @@ -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') diff --git a/oec/display.py b/oec/display.py index 9fd307b..b2b46d6 100644 --- a/oec/display.py +++ b/oec/display.py @@ -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):