From 359bbcc5b29785197ec1fbd06046c015aadc77d0 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Wed, 16 Nov 2005 07:06:35 +0000 Subject: The indent command no longer indents completely empty lines. --- src/Document.cxx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/Document.cxx b/src/Document.cxx index 8b506fbfd..e25638933 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -712,10 +712,13 @@ void Document::Indent(bool forwards, int lineBottom, int lineTop) { // Dedent - suck white space off the front of the line to dedent by equivalent of a tab for (int line = lineBottom; line >= lineTop; line--) { int indentOfLine = GetLineIndentation(line); - if (forwards) - SetLineIndentation(line, indentOfLine + IndentSize()); - else + if (forwards) { + if (LineStart(line) < LineEnd(line)) { + SetLineIndentation(line, indentOfLine + IndentSize()); + } + } else { SetLineIndentation(line, indentOfLine - IndentSize()); + } } } -- cgit v1.2.3