Fix in Utils::unCommentSelection to consider initial whites spaces when there's no selection and single line comment style.

This commit is contained in:
Leandro Melo
2010-05-07 14:17:48 +02:00
parent e7ddd2b80b
commit 7400557f8c

View File

@@ -193,6 +193,15 @@ void Utils::unCommentSelection(QPlainTextEdit *edit, const CommentDefinition &de
start = startBlock.position();
end = endBlock.position() + endBlock.length() - 1;
if (doMultiLineStyleUncomment) {
int offset = 0;
text = startBlock.text();
const int length = text.length();
while (offset < length && text.at(offset).isSpace())
++offset;
start += offset;
}
}
if (doMultiLineStyleUncomment) {