diff options
Diffstat (limited to 'src')
| -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()); +		}  	}  } | 
