aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2000-06-17 02:14:01 +0000
committernyamatongwe <devnull@localhost>2000-06-17 02:14:01 +0000
commit1dcaa0564b7fc7aa4f98083234d42fe5867080bc (patch)
treef164f0e1d489274608bca19996184ee472219798
parent9411ed02dc1eeda8e3e318051d68665f16bb6839 (diff)
downloadscintilla-mirror-1dcaa0564b7fc7aa4f98083234d42fe5867080bc.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))) {