jcs
/textview
/amendments
/60
TVCalcLinesLocked: Fix first append of text not drawing properly
jcs made amendment 60 about 1 year ago
--- textview.c Sun Dec 15 16:22:46 2024
+++ textview.c Wed Dec 18 21:28:09 2024
@@ -1614,8 +1614,9 @@ reload_chunk:
line->grew = true;
line->leading = style->font_info.leading;
}
- if (line->rect.bottom - line->rect.top < height &&
- line->start != line->end) {
+ if (line->rect.bottom == 0 ||
+ (line->rect.bottom - line->rect.top < height &&
+ line->start != line->end)) {
if (line->rect.bottom != line->rect.top &&
line->rect.bottom != 0)
line->grew = true;
@@ -1782,9 +1783,10 @@ TVFindInRectLocked(struct TVRec *tv, BigRect *rect, lo
match.line = TVGetLine(tv, startline);
}
}
- if (startline == 0)
- startline = 1;
}
+
+ if (startline == 0)
+ startline = 1;
for (nline = startline; nline <= tv->nlines; nline++) {
match.line = TVGetLine(tv, nline);