ref: 5b9b021d014e0fdfbd67dc2e28afa076a9cc262c
parent: b2faef784b96bd65060ed9604412bbdfcb5b273b
author: phil9 <telephil9@gmail.com>
date: Mon Aug 22 04:48:14 EDT 2022
fix line wrapping bug
--- a/text.c
+++ b/text.c
@@ -79,10 +79,10 @@
t->nlines = 1;
w = Dx(t->textr);
x = 0;
- s = 0;
wrap = 0;
h = nil;
for(i = 0; i < t->ndata; ){
+ s = i;
c = chartorune(&r, &t->data[i]);
if(r == '\n'){
if(i + c == t->ndata){