Skip to content

Commit

Permalink
Merge pull request #67047 from KoBeWi/_aacdeelmmnoptt
Browse files Browse the repository at this point in the history
Sort unused palette commands alphabetically
  • Loading branch information
akien-mga committed Oct 7, 2022
2 parents 39f9c4d + d8663b1 commit 1817782
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion editor/editor_command_palette.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@ class EditorCommandPalette : public ConfirmationDialog {

struct CommandHistoryComparator {
_FORCE_INLINE_ bool operator()(const CommandEntry &A, const CommandEntry &B) const {
return A.last_used > B.last_used;
if (A.last_used == B.last_used) {
return A.display_name < B.display_name;
} else {
return A.last_used > B.last_used;
}
}
};

Expand Down

0 comments on commit 1817782

Please sign in to comment.