summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ui/text_simple.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/ui/text_simple.c b/src/ui/text_simple.c
index 3afc631a..e88b09a8 100644
--- a/src/ui/text_simple.c
+++ b/src/ui/text_simple.c
@@ -169,6 +169,7 @@ static iRect runSimple_Font_(iFont *d, const iRunArgs *args) {
169 if (!notify_WrapText_(wrap, chPos, 0, iMax(xpos, xposExtend) - orig.x, iFalse)) { 169 if (!notify_WrapText_(wrap, chPos, 0, iMax(xpos, xposExtend) - orig.x, iFalse)) {
170 break; 170 break;
171 } 171 }
172 lastWordEnd = NULL;
172 xpos = xposExtend = orig.x; 173 xpos = xposExtend = orig.x;
173 ypos += d->height; 174 ypos += d->height;
174 prevCh = ch; 175 prevCh = ch;
@@ -240,21 +241,19 @@ static iRect runSimple_Font_(iFont *d, const iRunArgs *args) {
240 iAssert(wrap); 241 iAssert(wrap);
241 const char *wrapPos = currentPos; 242 const char *wrapPos = currentPos;
242 int advance = x1 - orig.x; 243 int advance = x1 - orig.x;
243 if (lastWordEnd != args->text.start && wrap->mode == word_WrapTextMode) { 244 if (lastWordEnd && wrap->mode == word_WrapTextMode) {
244 wrapPos = skipSpace_CStr(lastWordEnd); 245 wrapPos = skipSpace_CStr(lastWordEnd); /* go back */
245 wrapPos = iMin(wrapPos, args->text.end); 246 wrapPos = iMin(wrapPos, args->text.end);
246 advance = wrapAdvance; 247 advance = wrapAdvance;
247 } 248 }
248// if (args->continueFrom_out) {
249// *args->continueFrom_out = wrapPos;
250// }
251 if (!notify_WrapText_(wrap, wrapPos, 0, advance, iFalse)) { 249 if (!notify_WrapText_(wrap, wrapPos, 0, advance, iFalse)) {
252 break; 250 break;
253 } 251 }
252 lastWordEnd = NULL;
254 xpos = xposExtend = orig.x; 253 xpos = xposExtend = orig.x;
255 ypos += d->height; 254 ypos += d->height;
256 prevCh = 0; 255 prevCh = 0;
257 chPos = wrapPos; /* go back */ 256 chPos = wrapPos;
258 continue; 257 continue;
259 } 258 }
260 const int yLineMax = ypos + d->height; 259 const int yLineMax = ypos + d->height;