forked from qt-creator/qt-creator
Fixed the rewrapping not to leave around trailing spaces
Reviewed-by: Thorbjørn Lindeijer
This commit is contained in:
committed by
Thorbjørn Lindeijer
parent
eccc840cce
commit
ca825d2a96
@@ -3953,6 +3953,7 @@ void BaseTextEditor::rewrapParagraph()
|
||||
|
||||
if (currentLength > paragraphWidth) {
|
||||
currentLength = currentWord.length() + 1 + indentLevel;
|
||||
result.chop(1); // remove trailing space
|
||||
result.append(QChar::ParagraphSeparator);
|
||||
result.append(spacing);
|
||||
}
|
||||
@@ -3967,6 +3968,7 @@ void BaseTextEditor::rewrapParagraph()
|
||||
|
||||
currentWord.append(ch);
|
||||
}
|
||||
result.chop(1);
|
||||
result.append(QChar::ParagraphSeparator);
|
||||
|
||||
cursor.insertText(result);
|
||||
|
||||
Reference in New Issue
Block a user