diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-08-06 21:51:28 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-08-06 21:51:28 +0300 |
commit | 7e63a70bc30173d2e15fda77777aef3caf0cc76c (patch) | |
tree | 470b981a44d346997a7ed7f33111d2bbfc245efb /src/gmdocument.c | |
parent | 0f47f2f20dd5e6f098f4358cdfea50cf2e87bc56 (diff) |
DocumentWidget: Adjusted document borders
Diffstat (limited to 'src/gmdocument.c')
-rw-r--r-- | src/gmdocument.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gmdocument.c b/src/gmdocument.c index 9b7bd630..5f5e8ad0 100644 --- a/src/gmdocument.c +++ b/src/gmdocument.c | |||
@@ -857,6 +857,14 @@ iInt2 size_GmDocument(const iGmDocument *d) { | |||
857 | return d->size; | 857 | return d->size; |
858 | } | 858 | } |
859 | 859 | ||
860 | iBool hasSiteBanner_GmDocument(const iGmDocument *d) { | ||
861 | if (isEmpty_Array(&d->layout)) { | ||
862 | return iFalse; | ||
863 | } | ||
864 | const iGmRun *first = constFront_Array(&d->layout); | ||
865 | return (first->flags & siteBanner_GmRunFlag) != 0; | ||
866 | } | ||
867 | |||
860 | iRangecc findText_GmDocument(const iGmDocument *d, const iString *text, const char *start) { | 868 | iRangecc findText_GmDocument(const iGmDocument *d, const iString *text, const char *start) { |
861 | const char * src = constBegin_String(&d->source); | 869 | const char * src = constBegin_String(&d->source); |
862 | const size_t startPos = (start ? start - src : 0); | 870 | const size_t startPos = (start ? start - src : 0); |