mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-27 18:51:41 +02:00
Fix screen being deleted on resize
Also fix crash when resizing the altbuf
This commit is contained in:
@@ -27,8 +27,10 @@
|
|||||||
#define next_dest_line(continued) \
|
#define next_dest_line(continued) \
|
||||||
if (dest_y >= dest->ynum - 1) { \
|
if (dest_y >= dest->ynum - 1) { \
|
||||||
linebuf_index(dest, 0, dest->ynum - 1); \
|
linebuf_index(dest, 0, dest->ynum - 1); \
|
||||||
linebuf_init_line(dest, dest->ynum - 1); \
|
if (historybuf != NULL) { \
|
||||||
historybuf_add_line(historybuf, dest->line); \
|
linebuf_init_line(dest, dest->ynum - 1); \
|
||||||
|
historybuf_add_line(historybuf, dest->line); \
|
||||||
|
}\
|
||||||
} 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;
|
||||||
|
|||||||
@@ -104,8 +104,6 @@ static bool screen_resize(Screen *self, unsigned int lines, unsigned int columns
|
|||||||
|
|
||||||
self->lines = lines; self->columns = columns;
|
self->lines = lines; self->columns = columns;
|
||||||
self->margin_top = 0; self->margin_bottom = self->lines - 1;
|
self->margin_top = 0; self->margin_bottom = self->lines - 1;
|
||||||
screen_reset_mode(self, DECOM);
|
|
||||||
// TODO: resize history buf
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user