diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-09-04 17:39:19 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-09-04 17:39:19 +0300 |
commit | 5c23b5805a25b815458809eab74e47776c3f47ce (patch) | |
tree | e56a7561ad61c7753faffd9cbd82cf88bdc12326 /src/ui | |
parent | f6bbed48aac2f5497d81b33b3444226b8af1b2d3 (diff) | |
parent | b1621ee3fbd80f386c32e932ba6eb7f10bc3c822 (diff) |
Merge branch 'dev' into work/v1.7
# Conflicts:
# CMakeLists.txt
# res/about/version.gmi
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/text_simple.c | 11 |
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; |