From e0b41301a8cfaed746ea823c133e69b15d273c0b Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Mon, 29 Mar 2021 08:40:12 +0300 Subject: GmDocument: Fixed plain text layout --- src/gmdocument.c | 4 ++-- 1 file 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) { } } /* Folded blocks are represented by a single run with the alt text. */ - if (isPreformat) { + if (isPreformat && d->format != plainText_GmDocumentFormat) { const iGmPreMeta *meta = constAt_Array(&d->preMeta, preId - 1); if (meta->flags & folded_GmPreMetaFlag) { const iBool isBlank = isEmpty_Range(&meta->altText); @@ -669,7 +669,7 @@ static void doLayout_GmDocument_(iGmDocument *d) { type == quote_GmLineType ? 4 : 0); const iBool isWordWrapped = (d->format == plainText_GmDocumentFormat ? prefs->plainTextWrap : !isPreformat); - if (isPreformat) { + if (isPreformat && d->format != plainText_GmDocumentFormat) { /* Remember the top left coordinates of the block (first line of block). */ iGmPreMeta *meta = at_Array(&d->preMeta, preId - 1); if (~meta->flags & topLeft_GmPreMetaFlag) { -- cgit v1.2.3