mirror of
https://github.com/tmux/tmux.git
synced 2025-01-07 16:28:48 +00:00
Restore a check to stop scrolled lines becoming larger than total lines,
fixes a crash reported by Thomas Sattler.
This commit is contained in:
parent
d68a17a1df
commit
792fcb1dbf
2
grid.c
2
grid.c
@ -1284,6 +1284,8 @@ grid_reflow(struct grid *gd, u_int sx)
|
|||||||
if (target->sy < gd->sy)
|
if (target->sy < gd->sy)
|
||||||
grid_reflow_add(target, gd->sy - target->sy);
|
grid_reflow_add(target, gd->sy - target->sy);
|
||||||
gd->hsize = target->sy - gd->sy;
|
gd->hsize = target->sy - gd->sy;
|
||||||
|
if (gd->hscrolled > gd->hsize)
|
||||||
|
gd->hscrolled = gd->hsize;
|
||||||
free(gd->linedata);
|
free(gd->linedata);
|
||||||
gd->linedata = target->linedata;
|
gd->linedata = target->linedata;
|
||||||
free(target);
|
free(target);
|
||||||
|
Loading…
Reference in New Issue
Block a user