mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 13:59:52 +08:00
Editor: fix trailing space highlight
This commit is contained in:
parent
33c1229fb5
commit
45d4b28003
@ -272,12 +272,14 @@ void VEditor::filterTrailingSpace(QList<QTextEdit::ExtraSelection> &p_selects,
|
|||||||
}
|
}
|
||||||
|
|
||||||
QString text = cursor.block().text();
|
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;
|
continue;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
p_selects.append(*it);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
p_selects.append(*it);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user