diff --git a/src/plugins/texteditor/basetexteditor.cpp b/src/plugins/texteditor/basetexteditor.cpp
index b61236cdd95666b5d256b0e3ef17b1606270805e..4c2ee1090b4e369bbd6a2f5a02a6ce48ba401f60 100644
--- a/src/plugins/texteditor/basetexteditor.cpp
+++ b/src/plugins/texteditor/basetexteditor.cpp
@@ -3951,7 +3951,7 @@ void BaseTextEditor::rewrapParagraph()
             if (!currentWord.isEmpty()) {
                 currentLength += currentWord.length() + 1;
 
-                if (currentLength > paragraphWidth - indentLevel) {
+                if (currentLength > paragraphWidth) {
                     currentLength = currentWord.length() + 1 + indentLevel;
                     result.append(QChar::ParagraphSeparator);
                     result.append(spacing);