diff --git a/src/lib.rs b/src/lib.rs index 3dca60f..683456d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -141,7 +141,8 @@ pub fn get_matches(input: RString, state: &State) -> RVec { }) .collect::>(); - entries.sort_by(|a, b| b.2.cmp(&a.2)); + entries.sort_by(|a, b| b.2.cmp(&a.2) + .then(a.0.name.cmp(&b.0.name))); entries.truncate(state.config.max_entries); entries