From a86b0bc80f2fe6170deaaef6a308ec2b73a72a59 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Fri, 23 Feb 2007 00:46:15 +0000 Subject: Bug #1656532. Changed to use foreground of STYLE_DEFAULT but allow whitespace foreground to override. --- src/Editor.cxx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/Editor.cxx b/src/Editor.cxx index bf274ee60..f2c76116f 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -2374,6 +2374,10 @@ void Editor::DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int lineVis lineEnd = ll->LineStart(subLine + 1); } + ColourAllocated wrapColour = vsDraw.styles[STYLE_DEFAULT].fore.allocated; + if (vsDraw.whitespaceForegroundSet) + wrapColour = vsDraw.whitespaceForeground.allocated; + bool drawWrapMarkEnd = false; if (wrapVisualFlags & SC_WRAPVISUALFLAG_END) { @@ -2411,7 +2415,7 @@ void Editor::DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int lineVis else rcPlace.right = rcPlace.left + vsDraw.aveCharWidth; - DrawWrapMarker(surface, rcPlace, false, vsDraw.whitespaceForeground.allocated); + DrawWrapMarker(surface, rcPlace, false, wrapColour); } xStart += actualWrapVisualStartIndent * vsDraw.aveCharWidth; @@ -2478,7 +2482,7 @@ void Editor::DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int lineVis if (twoPhaseDraw) { DrawEOL(surface, vsDraw, rcLine, ll, line, lineEnd, xStart, subLine, subLineStart, overrideBackground, background, - drawWrapMarkEnd, vsDraw.whitespaceForeground.allocated); + drawWrapMarkEnd, wrapColour); } inIndentation = subLine == 0; // Do not handle indentation except on first subline. @@ -2677,7 +2681,7 @@ void Editor::DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int lineVis if (!twoPhaseDraw) { DrawEOL(surface, vsDraw, rcLine, ll, line, lineEnd, xStart, subLine, subLineStart, overrideBackground, background, - drawWrapMarkEnd, vsDraw.whitespaceForeground.allocated); + drawWrapMarkEnd, wrapColour); } if ((vsDraw.selAlpha != SC_ALPHA_NOALPHA) && (ll->selStart >= 0) && (ll->selEnd >= 0)) { int startPosSel = (ll->selStart < posLineStart) ? posLineStart : ll->selStart; -- cgit v1.2.3