Merge pull request #84232 from bruvzg/old_bug_waits_behind_the_wall
[TextServer] Fix glyph comparator ambiguous output.
This commit is contained in:
commit
508b4b4b57
1 changed files with 1 additions and 5 deletions
|
@ -681,11 +681,7 @@ class TextServerAdvanced : public TextServerExtension {
|
||||||
_FORCE_INLINE_ bool operator()(const Glyph &l, const Glyph &r) const {
|
_FORCE_INLINE_ bool operator()(const Glyph &l, const Glyph &r) const {
|
||||||
if (l.start == r.start) {
|
if (l.start == r.start) {
|
||||||
if (l.count == r.count) {
|
if (l.count == r.count) {
|
||||||
if ((l.flags & TextServer::GRAPHEME_IS_VIRTUAL) == TextServer::GRAPHEME_IS_VIRTUAL) {
|
return (l.flags & TextServer::GRAPHEME_IS_VIRTUAL) < (r.flags & TextServer::GRAPHEME_IS_VIRTUAL);
|
||||||
return false;
|
|
||||||
} else {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return l.count > r.count; // Sort first glyph with count & flags, order of the rest are irrelevant.
|
return l.count > r.count; // Sort first glyph with count & flags, order of the rest are irrelevant.
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue