From 5b49dc9ae8199e60ab27bf00fc04bfd6da920cb1 Mon Sep 17 00:00:00 2001
From: Henrik Abelsson <henrik@abelsson.com>
Date: Tue, 21 Jul 2009 10:37:00 +0200
Subject: [PATCH] Fixed wrapping to not take into account the indent level
 twice
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Reviewed-by: Thorbjørn Lindeijer
---
 src/plugins/texteditor/basetexteditor.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/plugins/texteditor/basetexteditor.cpp b/src/plugins/texteditor/basetexteditor.cpp
index b61236cdd95..4c2ee1090b4 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);
-- 
GitLab