From 4a2c47509b5691277a7e02ca10202bb59f06c19d Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Thu, 23 Jul 2009 04:46:27 +0000 Subject: Fixed bug where last line was seeing background colour extend past where it should. --- src/Editor.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Editor.cxx b/src/Editor.cxx index e2b87446d..764794fb2 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -2314,8 +2314,10 @@ void Editor::DrawEOL(Surface *surface, ViewStyle &vsDraw, PRectangle rcLine, Lin } else { if (overrideBackground) { surface->FillRectangle(rcSegment, background); - } else { + } else if (line < pdoc->LinesTotal() - 1) { surface->FillRectangle(rcSegment, vsDraw.styles[ll->styles[ll->numCharsInLine] & styleMask].back.allocated); + } else { + surface->FillRectangle(rcSegment, vsDraw.styles[STYLE_DEFAULT].back.allocated); } if (!hideSelection && eolInSelection && vsDraw.selbackset && (line < pdoc->LinesTotal() - 1) && (alpha != SC_ALPHA_NOALPHA)) { SimpleAlphaRectangle(surface, rcSegment, SelectionBackground(vsDraw, eolInSelection == 1), alpha); -- cgit v1.2.3