Editor: do not split on nbsp in rewrap paragraph

Change-Id: I443400056f647a58a98d9bb6a221b10852470ba2
Fixes: QTCREATORBUG-23643
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
David Schulz
2020-02-20 08:26:32 +01:00
parent c34864ccab
commit aee78bd58d

View File

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