diff options
author | nyamatongwe <unknown> | 2005-11-16 07:06:35 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2005-11-16 07:06:35 +0000 |
commit | 359bbcc5b29785197ec1fbd06046c015aadc77d0 (patch) | |
tree | e8000fe2a32e2bde5f6b5bf5bb0bce1b09baa8de /src/Document.cxx | |
parent | eb9fdf8294bc5f64cf45decd2d0a72b80f6383ae (diff) | |
download | scintilla-mirror-359bbcc5b29785197ec1fbd06046c015aadc77d0.tar.gz |
The indent command no longer indents completely empty lines.
Diffstat (limited to 'src/Document.cxx')
-rw-r--r-- | src/Document.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
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()); + } } } |