Delete files in search-mode. (fix for #252)
This commit is contained in:
parent
79aef18f7f
commit
c5ee8285ee
1 changed files with 13 additions and 2 deletions
15
src/app.rs
15
src/app.rs
|
|
@ -1696,6 +1696,11 @@ impl Application for App {
|
||||||
commands.push(self.update_notification());
|
commands.push(self.update_notification());
|
||||||
// Manually rescan any trash tabs after any operation is completed
|
// Manually rescan any trash tabs after any operation is completed
|
||||||
commands.push(self.rescan_trash());
|
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);
|
return Command::batch(commands);
|
||||||
}
|
}
|
||||||
Message::PendingError(id, err) => {
|
Message::PendingError(id, err) => {
|
||||||
|
|
@ -1842,8 +1847,14 @@ impl Application for App {
|
||||||
if let Some(tab) = self.tab_model.data::<Tab>(entity) {
|
if let Some(tab) = self.tab_model.data::<Tab>(entity) {
|
||||||
self.activate_nav_model_location(&tab.location.clone());
|
self.activate_nav_model_location(&tab.location.clone());
|
||||||
}
|
}
|
||||||
|
let mut commands = vec![];
|
||||||
return self.update_title();
|
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 => {
|
Message::TabNext => {
|
||||||
let len = self.tab_model.iter().count();
|
let len = self.tab_model.iter().count();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue