mirror of
https://github.com/veeso/termscp.git
synced 2025-12-07 09:36:00 -08:00
Ignore capital letters when sorting files
This commit is contained in:
@@ -10,7 +10,11 @@
|
|||||||
|
|
||||||
Work in progress
|
Work in progress
|
||||||
|
|
||||||
- password prompt: ask before performing terminal clear
|
- enhancements:
|
||||||
|
- password prompt: ask before performing terminal clear
|
||||||
|
- file explorer: file names are now sorted ignoring capital letters
|
||||||
|
- bugfix:
|
||||||
|
- prevent panic in set_progress, for progress values `> 100.0 or < 0.0`
|
||||||
|
|
||||||
## 0.1.0
|
## 0.1.0
|
||||||
|
|
||||||
|
|||||||
@@ -159,8 +159,8 @@ impl FileExplorer {
|
|||||||
/// Sort explorer files by their name
|
/// Sort explorer files by their name
|
||||||
pub fn sort_files_by_name(&mut self) {
|
pub fn sort_files_by_name(&mut self) {
|
||||||
self.files.sort_by_key(|x: &FsEntry| match x {
|
self.files.sort_by_key(|x: &FsEntry| match x {
|
||||||
FsEntry::Directory(dir) => dir.name.clone(),
|
FsEntry::Directory(dir) => dir.name.as_str().to_lowercase(),
|
||||||
FsEntry::File(file) => file.name.clone(),
|
FsEntry::File(file) => file.name.as_str().to_lowercase(),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user