From 66251f8fd523db1da73dcdf7a1d9cd9c0956b168 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 19 Oct 2024 14:02:06 +0530 Subject: [PATCH] Add test for previous bugfix main screen should have trailing output line preserved when resized on alt screen --- kitty_tests/screen.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/kitty_tests/screen.py b/kitty_tests/screen.py index e71b65ee7..d9dc0d472 100644 --- a/kitty_tests/screen.py +++ b/kitty_tests/screen.py @@ -1084,10 +1084,14 @@ class TestScreen(BaseTest): for i in range(n): s.draw(f'{i}{x}'), s.index(), s.carriage_return() - def lines_with_attrs(): - b = [] - s.dump_lines_with_attrs(b.append) - return ''.join(b) + s = self.create_screen(cols=5, lines=5, scrollback=15) + draw_output(3, 'oo') + draw_prompt('pp') + mark_output() + s.toggle_alt_screen() + s.resize(s.lines, 2) + s.toggle_alt_screen() + self.assertFalse(str(s.line(s.cursor.y))) s = self.create_screen() for i in range(4):