yazi/yazi-core/src/manager/commands/close.rs
2024-01-22 18:43:50 +08:00

12 lines
245 B
Rust

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