diff options
author | nyamatongwe <devnull@localhost> | 2006-03-14 11:11:08 +0000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2006-03-14 11:11:08 +0000 |
commit | a545c72f16b33bdeed1c0e790b3daa0dd7ae3096 (patch) | |
tree | 7626bc5cadde2a0724924736774da253a58a4142 /src | |
parent | 6c318192ca937edf399f799f09e1953b7c640a7f (diff) | |
download | scintilla-mirror-a545c72f16b33bdeed1c0e790b3daa0dd7ae3096.tar.gz |
Fix from John Ehresman where page mode caching with small window caused
0 length cache.
Diffstat (limited to 'src')
-rw-r--r-- | src/Editor.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
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); } } |