From 4fdf84a2b8c86e005023260ca581f968a048ec17 Mon Sep 17 00:00:00 2001 From: Neil Date: Sun, 19 Mar 2017 23:09:12 +1100 Subject: Group non-single-phase drawing before text. --- src/EditView.cxx | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/EditView.cxx b/src/EditView.cxx index fd9f43774..e73781016 100644 --- a/src/EditView.cxx +++ b/src/EditView.cxx @@ -1846,18 +1846,18 @@ void EditView::DrawLine(Surface *surface, const EditModel &model, const ViewStyl xStart += static_cast(ll->wrapIndent); } - if ((phasesDraw != phasesOne) && (phase & drawBack)) { - DrawBackground(surface, model, vsDraw, ll, rcLine, lineRange, posLineStart, xStart, - subLine, background); - DrawFoldDisplayText(surface, model, vsDraw, ll, line, xStart, rcLine, subLine, subLineStart, drawBack); - phase = static_cast(phase & ~drawBack); - DrawEOL(surface, model, vsDraw, ll, rcLine, line, lineRange.end, - xStart, subLine, subLineStart, background); - } + if (phasesDraw != phasesOne) { + if (phase & drawBack) { + DrawBackground(surface, model, vsDraw, ll, rcLine, lineRange, posLineStart, xStart, + subLine, background); + DrawFoldDisplayText(surface, model, vsDraw, ll, line, xStart, rcLine, subLine, subLineStart, drawBack); + phase = static_cast(phase & ~drawBack); // Remove drawBack to not draw again in DrawFoldDisplayText + DrawEOL(surface, model, vsDraw, ll, rcLine, line, lineRange.end, + xStart, subLine, subLineStart, background); + } - if (phase & drawIndicatorsBack) { - DrawIndicators(surface, model, vsDraw, ll, line, xStart, rcLine, subLine, lineRange.end, true, model.hoverIndicatorPos); - if (phasesDraw != phasesOne) { + if (phase & drawIndicatorsBack) { + DrawIndicators(surface, model, vsDraw, ll, line, xStart, rcLine, subLine, lineRange.end, true, model.hoverIndicatorPos); DrawEdgeLine(surface, vsDraw, ll, rcLine, lineRange, xStart); DrawMarkUnderline(surface, model, vsDraw, line, rcLine); } -- cgit v1.2.3