From f10796b2b66a7466a9d4f72c6140748d5dafc2f3 Mon Sep 17 00:00:00 2001 From: Jaro Date: Sun, 9 Apr 2023 19:09:21 +0200 Subject: [PATCH] Remove lines with zero size. These lines would otherwise affect line numbering. --- src/Data/Text/ParagraphLayout/Internal/Plain.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Data/Text/ParagraphLayout/Internal/Plain.hs b/src/Data/Text/ParagraphLayout/Internal/Plain.hs index d6859d6..efeeec1 100644 --- a/src/Data/Text/ParagraphLayout/Internal/Plain.hs +++ b/src/Data/Text/ParagraphLayout/Internal/Plain.hs @@ -69,7 +69,7 @@ layoutAndAlignLines maxWidth runs = frags frags = concat fragsInLines (_, fragsInLines) = mapAccumL positionLineH originY canonicalLines canonicalLines = fmap canonicalOrder logicalLines - logicalLines = layoutLines maxWidth runs + logicalLines = NonEmpty.filter (not . null) $ layoutLines maxWidth runs originY = paragraphOriginY -- | Reorder the given fragments from logical order to whatever order HarfBuzz -- 2.30.2