Sort the files in descending order
commitd94410a6782a2ac52dde2708fcadf9cbddfd8f93
authorBlaž Hrastnik <blaz@mxxn.io>
dateMon 28 Jun 2021, 13:08 (5 years ago)
parent82fc28a
helix-term/src/ui/mod.rs+1−1
@@ -106,7 +106,7 @@ pub fn file_picker(root: PathBuf) -> Picker<PathBuf> {
106106 files.take(MAX).collect()
107107 };
108108
109− files.sort_by_key(|file| file.1);
109+ files.sort_by_key(|file| std::cmp::Reverse(file.1));
110110
111111 let files = files.into_iter().map(|(path, _)| path).collect();
112112