diff options
Diffstat (limited to 'src/gmdocument.c')
-rw-r--r-- | src/gmdocument.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/gmdocument.c b/src/gmdocument.c index b5e71e21..5ff8c72f 100644 --- a/src/gmdocument.c +++ b/src/gmdocument.c | |||
@@ -316,7 +316,8 @@ static iBool isAllowedLinkIcon_Char_(iChar icon) { | |||
316 | icon == 0x2022 /* bullet */ || | 316 | icon == 0x2022 /* bullet */ || |
317 | icon == 0x2139 /* info */ || | 317 | icon == 0x2139 /* info */ || |
318 | (icon >= 0x2190 && icon <= 0x21ff /* arrows */) || | 318 | (icon >= 0x2190 && icon <= 0x21ff /* arrows */) || |
319 | icon == 0x2a2f /* close X */ || icon == 0x2b50; | 319 | icon == 0x2a2f /* close X */ || |
320 | (icon >= 0x2b00 && icon <= 0x2bff); | ||
320 | } | 321 | } |
321 | 322 | ||
322 | static iRangecc addLink_GmDocument_(iGmDocument *d, iRangecc line, iGmLinkId *linkId) { | 323 | static iRangecc addLink_GmDocument_(iGmDocument *d, iRangecc line, iGmLinkId *linkId) { |
@@ -1093,7 +1094,7 @@ static void doLayout_GmDocument_(iGmDocument *d) { | |||
1093 | /* Image metadata caption. */ { | 1094 | /* Image metadata caption. */ { |
1094 | run.font = FONT_ID(documentBody_FontId, semiBold_FontStyle, contentSmall_FontSize); | 1095 | run.font = FONT_ID(documentBody_FontId, semiBold_FontStyle, contentSmall_FontSize); |
1095 | run.color = tmQuoteIcon_ColorId; | 1096 | run.color = tmQuoteIcon_ColorId; |
1096 | run.flags = decoration_GmRunFlag; | 1097 | run.flags = decoration_GmRunFlag | caption_GmRunFlag; |
1097 | run.mediaId = 0; | 1098 | run.mediaId = 0; |
1098 | run.mediaType = 0; | 1099 | run.mediaType = 0; |
1099 | run.visBounds.pos.y = pos.y; | 1100 | run.visBounds.pos.y = pos.y; |
@@ -2208,7 +2209,7 @@ const iGmRun *renderProgressive_GmDocument(const iGmDocument *d, const iGmRun *f | |||
2208 | setAnsiFlags_Text(d->theme.ansiEscapes); | 2209 | setAnsiFlags_Text(d->theme.ansiEscapes); |
2209 | const iGmRun *run = first; | 2210 | const iGmRun *run = first; |
2210 | while (isValidRun_GmDocument_(d, run)) { | 2211 | while (isValidRun_GmDocument_(d, run)) { |
2211 | if ((dir < 0 && bottom_Rect(run->visBounds) < visRangeY.start) || | 2212 | if ((dir < 0 && bottom_Rect(run->visBounds) <= visRangeY.start) || |
2212 | (dir > 0 && top_Rect(run->visBounds) >= visRangeY.end)) { | 2213 | (dir > 0 && top_Rect(run->visBounds) >= visRangeY.end)) { |
2213 | break; | 2214 | break; |
2214 | } | 2215 | } |
@@ -2259,6 +2260,10 @@ const iString *source_GmDocument(const iGmDocument *d) { | |||
2259 | return &d->source; | 2260 | return &d->source; |
2260 | } | 2261 | } |
2261 | 2262 | ||
2263 | iGmRunRange runRange_GmDocument(const iGmDocument *d) { | ||
2264 | return (iGmRunRange){ constFront_Array(&d->layout), constEnd_Array(&d->layout) }; | ||
2265 | } | ||
2266 | |||
2262 | size_t memorySize_GmDocument(const iGmDocument *d) { | 2267 | size_t memorySize_GmDocument(const iGmDocument *d) { |
2263 | return size_String(&d->unormSource) + | 2268 | return size_String(&d->unormSource) + |
2264 | size_String(&d->source) + | 2269 | size_String(&d->source) + |