From aee78bd58db609efc729cf883e91049e0e342049 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Thu, 20 Feb 2020 08:26:32 +0100 Subject: Editor: do not split on nbsp in rewrap paragraph Change-Id: I443400056f647a58a98d9bb6a221b10852470ba2 Fixes: QTCREATORBUG-23643 Reviewed-by: Eike Ziller --- src/plugins/texteditor/texteditor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp index ac84aca67c..58ade7f6e7 100644 --- a/src/plugins/texteditor/texteditor.cpp +++ b/src/plugins/texteditor/texteditor.cpp @@ -7165,7 +7165,7 @@ void TextEditorWidget::rewrapParagraph() QString currentWord; for (const QChar &ch : qAsConst(selectedText)) { - if (ch.isSpace()) { + if (ch.isSpace() && ch != QChar::Nbsp) { if (!currentWord.isEmpty()) { currentLength += currentWord.length() + 1; -- cgit v1.2.1