From 25203d7b8c1060d0edd66c66a1f8a0fac2c9329b Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sat, 17 Jun 2000 02:14:01 +0000 Subject: Fixed performance problem with line < 0. --- src/Document.cxx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') 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))) { -- cgit v1.2.3