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 | 15a6a69d975e4e5a411fc22d18ef00c9bbb7c138 (patch) | |
tree | 7e6e16601f57494f7793fc401d89842e6ea6e678 /src/EditView.cxx | |
parent | b30b6e04a379a11060f7b7fe76e7a861a3afbb85 (diff) | |
download | scintilla-mirror-15a6a69d975e4e5a411fc22d18ef00c9bbb7c138.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/EditView.cxx')
-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; |