aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <unknown>2000-06-17 02:14:01 +0000
committernyamatongwe <unknown>2000-06-17 02:14:01 +0000
commit25203d7b8c1060d0edd66c66a1f8a0fac2c9329b (patch)
treef164f0e1d489274608bca19996184ee472219798
parentbe9123b4ae8348b8eea622a7fd559cbf07426aa6 (diff)
downloadscintilla-mirror-25203d7b8c1060d0edd66c66a1f8a0fac2c9329b.tar.gz
Fixed performance problem with line < 0.
-rw-r--r--src/Document.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Document.cxx b/src/Document.cxx
index c5aad504d..b6b875c66 100644
--- a/src/Document.cxx
+++ b/src/Document.cxx
@@ -592,6 +592,8 @@ void Document::SetLineIndentation(int line, int indent) {
}
int Document::GetLineIndentPosition(int line) {
+ if (line < 0)
+ return 0;
int pos = LineStart(line);
int length = Length();
while ((pos < length) && isindentchar(cb.CharAt(pos))) {