mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
feat: add new plugin command
This commit is contained in:
parent
3fcc2014bc
commit
9bdbc55117
2 changed files with 9 additions and 1 deletions
|
|
@ -10,7 +10,13 @@ impl Tab {
|
||||||
_ => !self.conf.show_hidden,
|
_ => !self.conf.show_hidden,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let hovered = self.current.hovered().map(|f| f.url());
|
||||||
self.apply_files_attrs();
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -172,6 +172,8 @@ impl<'a> Executor<'a> {
|
||||||
b"tasks_show" => self.app.cx.tasks.toggle(()),
|
b"tasks_show" => self.app.cx.tasks.toggle(()),
|
||||||
// Help
|
// Help
|
||||||
b"help" => self.app.cx.help.toggle(Layer::Manager),
|
b"help" => self.app.cx.help.toggle(Layer::Manager),
|
||||||
|
// Plugin
|
||||||
|
b"plugin" => self.app.plugin(exec),
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue