diff options
| author | Neil <nyamatongwe@gmail.com> | 2015-07-14 13:00:14 +1000 | 
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2015-07-14 13:00:14 +1000 | 
| commit | e85ed0e10fd79847e406f8552b00f2d6af7ac06c (patch) | |
| tree | c26cae52a9a4594ee290388b9f8fb28abca8cd47 /src | |
| parent | be850cc7139dbff5e72df7a2bea7d930715979ca (diff) | |
| download | scintilla-mirror-e85ed0e10fd79847e406f8552b00f2d6af7ac06c.tar.gz | |
Fix drawing problem when control characters are in a hidden style as they then
have a zero width rectangle to draw but modify that rectangle in a way that
clears some pixels.
Diffstat (limited to 'src')
| -rw-r--r-- | src/EditView.cxx | 4 | 
1 files changed, 3 insertions, 1 deletions
| diff --git a/src/EditView.cxx b/src/EditView.cxx index e6963e56a..43c3f842b 100644 --- a/src/EditView.cxx +++ b/src/EditView.cxx @@ -772,6 +772,8 @@ static void SimpleAlphaRectangle(Surface *surface, PRectangle rc, ColourDesired  static void DrawTextBlob(Surface *surface, const ViewStyle &vsDraw, PRectangle rcSegment,  	const char *s, ColourDesired textBack, ColourDesired textFore, bool fillBackground) { +	if (rcSegment.Empty()) +		return;  	if (fillBackground) {  		surface->FillRectangle(rcSegment, textBack);  	} @@ -1284,7 +1286,7 @@ void EditView::DrawBackground(Surface *surface, const EditModel &model, const Vi  		rcSegment.right = ll->positions[ts.end()] + xStart - static_cast<XYPOSITION>(subLineStart);  		// Only try to draw if really visible - enhances performance by not calling environment to  		// draw strings that are completely past the right side of the window. -		if (rcSegment.Intersects(rcLine)) { +		if (!rcSegment.Empty() && rcSegment.Intersects(rcLine)) {  			// Clip to line rectangle, since may have a huge position which will not work with some platforms  			if (rcSegment.left < rcLine.left)  				rcSegment.left = rcLine.left; | 
