diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-03-29 08:40:12 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-03-29 08:40:12 +0300 |
commit | e0b41301a8cfaed746ea823c133e69b15d273c0b (patch) | |
tree | 3c5d1ab0662512e290bfb817ef56d532ec4acdf2 /src | |
parent | 146f4a0fa9e605afba175d2188005789f5575964 (diff) |
GmDocument: Fixed plain text layout
Diffstat (limited to 'src')
-rw-r--r-- | src/gmdocument.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gmdocument.c b/src/gmdocument.c index 874a117e..007311d2 100644 --- a/src/gmdocument.c +++ b/src/gmdocument.c | |||
@@ -537,7 +537,7 @@ static void doLayout_GmDocument_(iGmDocument *d) { | |||
537 | } | 537 | } |
538 | } | 538 | } |
539 | /* Folded blocks are represented by a single run with the alt text. */ | 539 | /* Folded blocks are represented by a single run with the alt text. */ |
540 | if (isPreformat) { | 540 | if (isPreformat && d->format != plainText_GmDocumentFormat) { |
541 | const iGmPreMeta *meta = constAt_Array(&d->preMeta, preId - 1); | 541 | const iGmPreMeta *meta = constAt_Array(&d->preMeta, preId - 1); |
542 | if (meta->flags & folded_GmPreMetaFlag) { | 542 | if (meta->flags & folded_GmPreMetaFlag) { |
543 | const iBool isBlank = isEmpty_Range(&meta->altText); | 543 | const iBool isBlank = isEmpty_Range(&meta->altText); |
@@ -669,7 +669,7 @@ static void doLayout_GmDocument_(iGmDocument *d) { | |||
669 | type == quote_GmLineType ? 4 : 0); | 669 | type == quote_GmLineType ? 4 : 0); |
670 | const iBool isWordWrapped = | 670 | const iBool isWordWrapped = |
671 | (d->format == plainText_GmDocumentFormat ? prefs->plainTextWrap : !isPreformat); | 671 | (d->format == plainText_GmDocumentFormat ? prefs->plainTextWrap : !isPreformat); |
672 | if (isPreformat) { | 672 | if (isPreformat && d->format != plainText_GmDocumentFormat) { |
673 | /* Remember the top left coordinates of the block (first line of block). */ | 673 | /* Remember the top left coordinates of the block (first line of block). */ |
674 | iGmPreMeta *meta = at_Array(&d->preMeta, preId - 1); | 674 | iGmPreMeta *meta = at_Array(&d->preMeta, preId - 1); |
675 | if (~meta->flags & topLeft_GmPreMetaFlag) { | 675 | if (~meta->flags & topLeft_GmPreMetaFlag) { |