aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <unknown>2008-09-04 13:05:55 +0000
committernyamatongwe <unknown>2008-09-04 13:05:55 +0000
commitf1efaeac8c31646f3ead0212c61428d8626db1dc (patch)
treeec2accc6a2eee8c7f5acde3b531fda02104b2344 /src
parent6480f2c7d4d22b854eb8203adc5b8ee9629111d4 (diff)
downloadscintilla-mirror-f1efaeac8c31646f3ead0212c61428d8626db1dc.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.cxx4
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) {