Test prompt drawing after screen is shrunk

This commit is contained in:
Kovid Goyal
2022-02-21 21:01:16 +05:30
parent da5e37620e
commit 65c7ecbc30
2 changed files with 19 additions and 1 deletions

View File

@@ -216,6 +216,8 @@ class PTY:
raise TimeoutError('The condition was not met')
def set_window_size(self, rows=25, columns=80):
if hasattr(self, 'screen'):
self.screen.resize(rows, columns)
x_pixels = columns * self.cell_width
y_pixels = rows * self.cell_height
s = struct.pack('HHHH', rows, columns, x_pixels, y_pixels)