fix: filter for items with paths in multi-preview
This commit is contained in:
parent
8c3e26d0d0
commit
b793d025c2
1 changed files with 14 additions and 1 deletions
15
src/tab.rs
15
src/tab.rs
|
|
@ -6042,7 +6042,20 @@ impl Tab {
|
|||
);
|
||||
|
||||
let selected_items: Vec<&Item> = self.items_opt().map_or(Vec::new(), |items| {
|
||||
items.iter().filter(|item| item.selected).collect()
|
||||
items
|
||||
.iter()
|
||||
.filter(|item| {
|
||||
if item.selected {
|
||||
item.location_opt
|
||||
.as_ref()
|
||||
.map(Location::path_opt)
|
||||
.flatten()
|
||||
.is_some()
|
||||
} else {
|
||||
false
|
||||
}
|
||||
})
|
||||
.collect()
|
||||
});
|
||||
|
||||
let mut details = widget::column().spacing(space_xxxs);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue