From a545c72f16b33bdeed1c0e790b3daa0dd7ae3096 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Tue, 14 Mar 2006 11:11:08 +0000 Subject: Fix from John Ehresman where page mode caching with small window caused 0 length cache. --- src/Editor.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Editor.cxx b/src/Editor.cxx index 9df8b2e8c..9b20bfa2d 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -285,7 +285,7 @@ LineLayout *LineLayoutCache::Retrieve(int lineNumber, int lineCaret, int maxChar } else if (level == llcPage) { if (lineNumber == lineCaret) { pos = 0; - } else { + } else if (length > 1) { pos = 1 + (lineNumber % (length - 1)); } } else if (level == llcDocument) { @@ -2657,7 +2657,7 @@ void Editor::DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int lineVis if (caret.active && vsDraw.showCaretLineBackground && (vsDraw.caretLineAlpha != SC_ALPHA_NOALPHA) && ll->containsCaret) { rcSegment.left = xStart; rcSegment.right = rcLine.right - 1; - surface->AlphaRectangle(rcSegment, 0, vsDraw.caretLineBackground.allocated, vsDraw.caretLineAlpha, + surface->AlphaRectangle(rcSegment, 0, vsDraw.caretLineBackground.allocated, vsDraw.caretLineAlpha, vsDraw.caretLineBackground.allocated, vsDraw.caretLineAlpha, 0); } } -- cgit v1.2.3