feat: add new plugin command

This commit is contained in:
sxyazi 2024-01-05 15:22:28 +08:00
parent 3fcc2014bc
commit 9bdbc55117
No known key found for this signature in database
2 changed files with 9 additions and 1 deletions

View file

@ -10,7 +10,13 @@ impl Tab {
_ => !self.conf.show_hidden,
};
let hovered = self.current.hovered().map(|f| f.url());
self.apply_files_attrs();
Manager::_hover(None);
if hovered.as_ref() != self.current.hovered().map(|f| &f.url) {
Manager::_hover(hovered);
} else if self.current.hovered().is_some_and(|f| f.is_dir()) {
Manager::_peek(true);
}
}
}

View file

@ -172,6 +172,8 @@ impl<'a> Executor<'a> {
b"tasks_show" => self.app.cx.tasks.toggle(()),
// Help
b"help" => self.app.cx.help.toggle(Layer::Manager),
// Plugin
b"plugin" => self.app.plugin(exec),
_ => {}
}
}