forked from qt-creator/qt-creator
Fix in Utils::unCommentSelection to consider initial whites spaces when there's no selection and single line comment style.
This commit is contained in:
@@ -193,6 +193,15 @@ void Utils::unCommentSelection(QPlainTextEdit *edit, const CommentDefinition &de
|
|||||||
|
|
||||||
start = startBlock.position();
|
start = startBlock.position();
|
||||||
end = endBlock.position() + endBlock.length() - 1;
|
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) {
|
if (doMultiLineStyleUncomment) {
|
||||||
|
|||||||
Reference in New Issue
Block a user