Commit ca825d2a authored by Henrik Abelsson's avatar Henrik Abelsson Committed by Thorbjørn Lindeijer
Browse files

Fixed the rewrapping not to leave around trailing spaces

Reviewed-by: Thorbjørn Lindeijer
parent eccc840c
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment