Ensure files sort after folders
This commit is contained in:
parent
5e532534c3
commit
ee2dea71e6
2 changed files with 5 additions and 2 deletions
|
|
@ -507,7 +507,6 @@ impl cosmic::Application for App {
|
|||
});
|
||||
}
|
||||
Message::PasteValue(value) => {
|
||||
println!("Paste {:?}", value);
|
||||
match self.active_tab() {
|
||||
Some(tab) => {
|
||||
let mut editor = tab.editor.lock().unwrap();
|
||||
|
|
|
|||
|
|
@ -77,7 +77,11 @@ impl Ord for ProjectNode {
|
|||
Self::File { .. } => return Ordering::Less,
|
||||
_ => {}
|
||||
},
|
||||
_ => {}
|
||||
// Files are always after folders
|
||||
Self::File { .. } => match other {
|
||||
Self::Folder { .. } => return Ordering::Greater,
|
||||
_ => {}
|
||||
},
|
||||
}
|
||||
self.name().cmp(other.name())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue