box_norm fix
This commit is contained in:
parent
8b868c3ee1
commit
bcfda49d4c
|
@ -1906,14 +1906,14 @@ void txt_box_norm(textbox_t tbox)
|
||||||
{
|
{
|
||||||
struct textbox *box = (struct textbox *)tbox;
|
struct textbox *box = (struct textbox *)tbox;
|
||||||
struct line *line;
|
struct line *line;
|
||||||
|
int off = box->off;
|
||||||
|
|
||||||
if (!box->lay)
|
if (!box->lay)
|
||||||
return;
|
return;
|
||||||
for (line = box->lay->lines; line; line = line->next) {
|
for (line = box->lay->lines; line; line = line->next) {
|
||||||
if (box->off < line->h) {
|
if (off < line->h)
|
||||||
box->line = line;
|
|
||||||
break;
|
break;
|
||||||
}
|
off -= line->h;
|
||||||
box->off -= line->h;
|
|
||||||
}
|
}
|
||||||
box->line = box->lay->lines;
|
box->line = box->lay->lines;
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue