diff options
author | nyamatongwe <devnull@localhost> | 2008-09-04 13:05:55 +0000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2008-09-04 13:05:55 +0000 |
commit | 2c9017bf225e0d61d208c51663eca495d0833d77 (patch) | |
tree | ec2accc6a2eee8c7f5acde3b531fda02104b2344 /src | |
parent | abf1252683114c1ff753f5ff830f88b310a434d6 (diff) | |
download | scintilla-mirror-2c9017bf225e0d61d208c51663eca495d0833d77.tar.gz |
Bug #2087470 fix.
Avoid very long searches for a non-blank line to determine indentation
guides.
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 1c08b7cc9..ffc2dee22 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -2566,7 +2566,7 @@ void Editor::DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int lineVis // Find the most recent line with some text int lineLastWithText = line; - while (lineLastWithText > 0 && pdoc->IsWhiteLine(lineLastWithText)) { + while (lineLastWithText > Platform::Maximum(line-20, 0) && pdoc->IsWhiteLine(lineLastWithText)) { lineLastWithText--; } if (lineLastWithText < line) { @@ -2588,7 +2588,7 @@ void Editor::DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int lineVis } int lineNextWithText = line; - while (lineNextWithText < pdoc->LinesTotal() && pdoc->IsWhiteLine(lineNextWithText)) { + while (lineNextWithText < Platform::Minimum(line+20, pdoc->LinesTotal()) && pdoc->IsWhiteLine(lineNextWithText)) { lineNextWithText++; } if (lineNextWithText > line) { |