Fix top lines appearing at bottom when resizing a screen that seen more lines than the number of lines available
This commit is contained in:
parent
b6c639c487
commit
271e3360ff
@ -31,6 +31,7 @@
|
|||||||
linebuf_init_line(dest, dest->ynum - 1); \
|
linebuf_init_line(dest, dest->ynum - 1); \
|
||||||
historybuf_add_line(historybuf, dest->line); \
|
historybuf_add_line(historybuf, dest->line); \
|
||||||
}\
|
}\
|
||||||
|
linebuf_clear_line(dest, dest->ynum - 1); \
|
||||||
} else dest_y++; \
|
} else dest_y++; \
|
||||||
init_dest_line(dest_y); \
|
init_dest_line(dest_y); \
|
||||||
dest->continued_map[dest_y] = continued;
|
dest->continued_map[dest_y] = continued;
|
||||||
|
|||||||
@ -246,6 +246,11 @@ class TestScreen(BaseTest):
|
|||||||
for i in range(s.lines):
|
for i in range(s.lines):
|
||||||
self.ae(str(hb.line(i)), '3')
|
self.ae(str(hb.line(i)), '3')
|
||||||
self.ae(str(hb.line(5)), '2')
|
self.ae(str(hb.line(5)), '2')
|
||||||
|
s = self.create_screen(scrollback=6)
|
||||||
|
s.draw(''.join([str(i) * s.columns for i in range(s.lines*2)]))
|
||||||
|
self.ae(str(s.line(4)), '9'*5)
|
||||||
|
s.resize(5, 2)
|
||||||
|
self.ae(str(s.line(4)), '9 ')
|
||||||
|
|
||||||
def test_tab_stops(self):
|
def test_tab_stops(self):
|
||||||
# Taken from vttest/main.c
|
# Taken from vttest/main.c
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user