Delete files in search-mode. (fix for #252)

This commit is contained in:
l-const 2024-09-04 00:40:51 +03:00
parent 79aef18f7f
commit c5ee8285ee
No known key found for this signature in database
GPG key ID: 71BB70D3244647EF

View file

@ -1696,6 +1696,11 @@ impl Application for App {
commands.push(self.update_notification());
// Manually rescan any trash tabs after any operation is completed
commands.push(self.rescan_trash());
// if search is active, update "search" tab view
if !self.search_input.is_empty() {
commands.push(self.search());
}
return Command::batch(commands);
}
Message::PendingError(id, err) => {
@ -1842,8 +1847,14 @@ impl Application for App {
if let Some(tab) = self.tab_model.data::<Tab>(entity) {
self.activate_nav_model_location(&tab.location.clone());
}
return self.update_title();
let mut commands = vec![];
commands.push(self.update_title());
// if the tab was in an active search mode
// search again in case files were modified/deleted
if !self.search_input.is_empty() {
commands.push(self.search());
}
return Command::batch(commands);
}
Message::TabNext => {
let len = self.tab_model.iter().count();