Fixed the rewrapping not to leave around trailing spaces

Reviewed-by: Thorbjørn Lindeijer
This commit is contained in:
Henrik Abelsson
2009-07-21 12:34:56 +02:00
committed by Thorbjørn Lindeijer
parent eccc840cce
commit ca825d2a96

View File

@@ -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);