Editor: fix trailing space highlight

This commit is contained in:
Le Tan 2018-08-24 20:14:17 +08:00
parent 33c1229fb5
commit 45d4b28003

View File

@ -272,12 +272,14 @@ void VEditor::filterTrailingSpace(QList<QTextEdit::ExtraSelection> &p_selects,
}
QString text = cursor.block().text();
if (!text.isEmpty() && !text[text.size() - 1].isSpace()) {
if (text.isEmpty()) {
continue;
} else if (!text[text.size() - 1].isSpace()) {
continue;
}
} else {
p_selects.append(*it);
}
p_selects.append(*it);
}
}