diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Editor.cxx | 18 | ||||
| -rw-r--r-- | src/LineMarker.cxx | 2 | 
2 files changed, 18 insertions, 2 deletions
| diff --git a/src/Editor.cxx b/src/Editor.cxx index a67821147..80156e6af 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -2532,6 +2532,18 @@ void Editor::DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int lineVis  		surface->FillRectangle(rcSegment, vsDraw.edgecolour.allocated);  	} +	// Draw underline mark as part of background if not transparent +	int marks = pdoc->GetMark(line); +	for (int markBit = 0; (markBit < 32) && marks; markBit++) { +		if ((marks & 1) && (vsDraw.markers[markBit].markType == SC_MARK_UNDERLINE) && +		    (vsDraw.markers[markBit].alpha == SC_ALPHA_NOALPHA)) { +			PRectangle rcUnderline = rcLine; +			rcUnderline.top = rcUnderline.bottom - 2; +			surface->FillRectangle(rcUnderline, vsDraw.markers[markBit].back.allocated); +		} +		marks >>= 1; +	} +  	inIndentation = subLine == 0;	// Do not handle indentation except on first subline.  	// Foreground drawing loop  	BreakFinder bfFore(ll, lineStart, lineEnd, posLineStart, IsUnicodeMode(), xStartVisible); @@ -2748,10 +2760,14 @@ void Editor::DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int lineVis  	if (caret.active && vsDraw.showCaretLineBackground && ll->containsCaret) {  		SimpleAlphaRectangle(surface, rcSegment, vsDraw.caretLineBackground.allocated, vsDraw.caretLineAlpha);  	} -	int marks = pdoc->GetMark(line); +	marks = pdoc->GetMark(line);  	for (int markBit = 0; (markBit < 32) && marks; markBit++) {  		if ((marks & 1) && (vsDraw.markers[markBit].markType == SC_MARK_BACKGROUND)) {  			SimpleAlphaRectangle(surface, rcSegment, vsDraw.markers[markBit].back.allocated, vsDraw.markers[markBit].alpha); +		} else if ((marks & 1) && (vsDraw.markers[markBit].markType == SC_MARK_UNDERLINE)) { +			PRectangle rcUnderline = rcSegment; +			rcUnderline.top = rcUnderline.bottom - 2; +			SimpleAlphaRectangle(surface, rcUnderline, vsDraw.markers[markBit].back.allocated, vsDraw.markers[markBit].alpha);  		}  		marks >>= 1;  	} diff --git a/src/LineMarker.cxx b/src/LineMarker.cxx index f79c3c085..f79f4f48a 100644 --- a/src/LineMarker.cxx +++ b/src/LineMarker.cxx @@ -154,7 +154,7 @@ void LineMarker::Draw(Surface *surface, PRectangle &rcWhole, Font &fontForCharac  		rcSmall.bottom = rc.bottom - 2;  		surface->RectangleDraw(rcSmall, fore.allocated, back.allocated); -	} else if (markType == SC_MARK_EMPTY || markType == SC_MARK_BACKGROUND) { +	} else if (markType == SC_MARK_EMPTY || markType == SC_MARK_BACKGROUND || markType == SC_MARK_UNDERLINE) {  		// An invisible marker so don't draw anything  	} else if (markType == SC_MARK_VLINE) { | 
