From 9fdd929f8f3dd1cb6d8e2f2b11b06fe56fb99221 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Mon, 4 Jan 2021 19:17:19 +0200 Subject: GmDocument: Quote border line on empty quote lines IssueID #108 --- src/gmdocument.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/gmdocument.c') diff --git a/src/gmdocument.c b/src/gmdocument.c index 1717f92f..f73b7dc4 100644 --- a/src/gmdocument.c +++ b/src/gmdocument.c @@ -400,6 +400,15 @@ static void doLayout_GmDocument_(iGmDocument *d) { } /* Empty lines don't produce text runs. */ if (isEmpty_Range(&line)) { + if (type == quote_GmLineType && !prefs->quoteIcon) { + /* For quote indicators we still need to produce a run. */ + run.visBounds.pos = addX_I2(pos, indents[type] * gap_Text); + run.visBounds.size = init_I2(gap_Text, lineHeight_Text(run.font)); + run.bounds = zero_Rect(); /* just visual */ + run.flags = quoteBorder_GmRunFlag | decoration_GmRunFlag; + run.text = iNullRange; + pushBack_Array(&d->layout, &run); + } pos.y += lineHeight_Text(run.font); prevType = type; if (type != quote_GmLineType) { -- cgit v1.2.3