mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
16 lines
290 B
Rust
16 lines
290 B
Rust
use yazi_shared::event::Exec;
|
|
|
|
use crate::tab::Tab;
|
|
|
|
impl Tab {
|
|
pub fn linemode(&mut self, e: &Exec) -> bool {
|
|
self.conf.patch(|c| {
|
|
let Some(mode) = e.args.first() else {
|
|
return;
|
|
};
|
|
if !mode.is_empty() && mode.len() <= 20 {
|
|
c.linemode = mode.to_owned();
|
|
}
|
|
})
|
|
}
|
|
}
|