forked from enlightenment/terminology
wrap code - line2 COULD be NULL technically, so handle that case
This commit is contained in:
parent
05d091483a
commit
6cbc4c1a09
|
@ -639,7 +639,7 @@ termpty_line_rewrap(Termpty *ty, int y_start, int y_end,
|
|||
int x, x2, y, y2, y2_start;
|
||||
int len, len_last, len_remaining, copy_width, ts2_width;
|
||||
Termsave *ts, *ts2;
|
||||
Termcell *line, *line2;
|
||||
Termcell *line, *line2 = NULL;
|
||||
|
||||
if (y_end >= 0)
|
||||
{
|
||||
|
@ -714,6 +714,8 @@ termpty_line_rewrap(Termpty *ty, int y_start, int y_end,
|
|||
back2[y2 + ty->backmax] = ts2;
|
||||
}
|
||||
}
|
||||
if (line2)
|
||||
{
|
||||
termpty_cell_copy(ty, line + x, line2 + x2, copy_width);
|
||||
x += copy_width;
|
||||
x2 += copy_width;
|
||||
|
@ -725,6 +727,7 @@ termpty_line_rewrap(Termpty *ty, int y_start, int y_end,
|
|||
y2++;
|
||||
}
|
||||
}
|
||||
}
|
||||
x = 0;
|
||||
y++;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue