yazi/yazi-core/src/manager/commands/close.rs
2024-03-29 23:30:30 +08:00

12 lines
246 B
Rust

use yazi_shared::event::Cmd;
use crate::{manager::Manager, tasks::Tasks};
impl Manager {
pub fn close(&mut self, _: Cmd, tasks: &Tasks) {
if self.tabs.len() > 1 {
return self.tabs.close(self.tabs.cursor);
}
self.quit((), tasks);
}
}