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 69fe77f8..546dc6f5 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) { |
@@ -1097,7 +1098,7 @@ static void doLayout_GmDocument_(iGmDocument *d) { | |||
1097 | /* Image metadata caption. */ { | 1098 | /* Image metadata caption. */ { |
1098 | run.font = FONT_ID(documentBody_FontId, semiBold_FontStyle, contentSmall_FontSize); | 1099 | run.font = FONT_ID(documentBody_FontId, semiBold_FontStyle, contentSmall_FontSize); |
1099 | run.color = tmQuoteIcon_ColorId; | 1100 | run.color = tmQuoteIcon_ColorId; |
1100 | run.flags = decoration_GmRunFlag; | 1101 | run.flags = decoration_GmRunFlag | caption_GmRunFlag; |
1101 | run.mediaId = 0; | 1102 | run.mediaId = 0; |
1102 | run.mediaType = 0; | 1103 | run.mediaType = 0; |
1103 | run.visBounds.pos.y = pos.y; | 1104 | run.visBounds.pos.y = pos.y; |
@@ -2212,7 +2213,7 @@ const iGmRun *renderProgressive_GmDocument(const iGmDocument *d, const iGmRun *f | |||
2212 | setAnsiFlags_Text(d->theme.ansiEscapes); | 2213 | setAnsiFlags_Text(d->theme.ansiEscapes); |
2213 | const iGmRun *run = first; | 2214 | const iGmRun *run = first; |
2214 | while (isValidRun_GmDocument_(d, run)) { | 2215 | while (isValidRun_GmDocument_(d, run)) { |
2215 | if ((dir < 0 && bottom_Rect(run->visBounds) < visRangeY.start) || | 2216 | if ((dir < 0 && bottom_Rect(run->visBounds) <= visRangeY.start) || |
2216 | (dir > 0 && top_Rect(run->visBounds) >= visRangeY.end)) { | 2217 | (dir > 0 && top_Rect(run->visBounds) >= visRangeY.end)) { |
2217 | break; | 2218 | break; |
2218 | } | 2219 | } |
@@ -2263,6 +2264,10 @@ const iString *source_GmDocument(const iGmDocument *d) { | |||
2263 | return &d->source; | 2264 | return &d->source; |
2264 | } | 2265 | } |
2265 | 2266 | ||
2267 | iGmRunRange runRange_GmDocument(const iGmDocument *d) { | ||
2268 | return (iGmRunRange){ constFront_Array(&d->layout), constEnd_Array(&d->layout) }; | ||
2269 | } | ||
2270 | |||
2266 | size_t memorySize_GmDocument(const iGmDocument *d) { | 2271 | size_t memorySize_GmDocument(const iGmDocument *d) { |
2267 | return size_String(&d->unormSource) + | 2272 | return size_String(&d->unormSource) + |
2268 | size_String(&d->source) + | 2273 | size_String(&d->source) + |