Skip to content

Commit

Permalink
Merge pull request #84232 from bruvzg/old_bug_waits_behind_the_wall
Browse files Browse the repository at this point in the history
[TextServer] Fix glyph comparator ambiguous output.
  • Loading branch information
akien-mga committed Oct 31, 2023
2 parents c942297 + f52559b commit 508b4b4
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions modules/text_server_adv/text_server_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -681,11 +681,7 @@ class TextServerAdvanced : public TextServerExtension {
_FORCE_INLINE_ bool operator()(const Glyph &l, const Glyph &r) const {
if (l.start == r.start) {
if (l.count == r.count) {
if ((l.flags & TextServer::GRAPHEME_IS_VIRTUAL) == TextServer::GRAPHEME_IS_VIRTUAL) {
return false;
} else {
return true;
}
return (l.flags & TextServer::GRAPHEME_IS_VIRTUAL) < (r.flags & TextServer::GRAPHEME_IS_VIRTUAL);
}
return l.count > r.count; // Sort first glyph with count & flags, order of the rest are irrelevant.
} else {
Expand Down

0 comments on commit 508b4b4

Please sign in to comment.