commit b25cfce10d385976da4d961a6158a3c1216aa7fc
parent 3ee6b92c42720d38dcf7f50bfd97b21e08d41404
Author: Pavel Renev <an2qzavok@gmail.com>
Date: Sat, 21 Aug 2021 20:20:30 +0000
fix long line roll-over
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/richterm.c b/richterm.c
@@ -554,7 +554,10 @@ drawchar(Object *obj, long n, Point *cur)
p = arrayget(rich.text, n);
cw = stringnwidth(obj->font, p, 1);
- if (cur->x + cw > Dx(rich.page.r)) *cur = obj->nextlinept;
+ if (cur->x + cw > Dx(rich.page.r)) {
+ *cur = obj->nextlinept;
+ obj->nextlinept.y += obj->font->height;
+ }
switch (*p) {
case '\n':