diff --git a/src/insets/InsetIndex.cpp b/src/insets/InsetIndex.cpp index 02a3706961..573ad66ce5 100644 --- a/src/insets/InsetIndex.cpp +++ b/src/insets/InsetIndex.cpp @@ -662,9 +662,12 @@ struct IndexEntry bool operator<(IndexEntry const & lhs, IndexEntry const & rhs) { - return lhs.main < rhs.main - || (lhs.main == rhs.main && lhs.sub < rhs.sub) - || (lhs.main == rhs.main && lhs.sub == rhs.sub && lhs.subsub < rhs.subsub); + int comp = compare_no_case(lhs.main, rhs.main); + if (comp == 0) + comp = compare_no_case(lhs.sub, rhs.sub); + if (comp == 0) + comp = compare_no_case(lhs.subsub, rhs.subsub); + return (comp < 0); } } // anon namespace