mirror of
https://github.com/sxyazi/yazi.git
synced 2024-09-11 18:38:19 +03:00
fix: split old_hidden
line so the logic is clearer
This commit is contained in:
parent
b87df4bba5
commit
a034168174
@ -387,8 +387,12 @@ impl Files {
|
||||
}
|
||||
|
||||
let old_hidden: Vec<File>;
|
||||
(self.hidden, old_hidden) =
|
||||
self.hidden.iter().cloned().partition(|f| !self.show_hidden && f.is_hidden());
|
||||
if self.show_hidden {
|
||||
(self.hidden, old_hidden) = (Vec::new(), self.hidden.clone());
|
||||
} else {
|
||||
(self.hidden, old_hidden) =
|
||||
self.hidden.iter().cloned().partition(|f| f.is_hidden());
|
||||
};
|
||||
|
||||
if keyword.is_empty() {
|
||||
self.filter = None;
|
||||
|
Loading…
Reference in New Issue
Block a user