From c39972295941445ba3021ab02599b372426372d2 Mon Sep 17 00:00:00 2001 From: afonsofrancof Date: Tue, 30 Jul 2024 22:56:38 +0100 Subject: [PATCH] Sorting alphabetically --- src/list.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/list.rs b/src/list.rs index 9abb156d..753b9e02 100644 --- a/src/list.rs +++ b/src/list.rs @@ -168,7 +168,9 @@ impl CustomList { } items } else { - self.filtered_items + let mut sorted_items = self.filtered_items.clone(); + sorted_items.sort_by(|a, b| a.name.cmp(b.name)); + sorted_items .iter() .map(|node| { Line::from(format!("{} {}", state.theme.cmd_icon, node.name))