mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
..
This commit is contained in:
parent
87e9f3c737
commit
bf2e61d28d
1 changed files with 3 additions and 0 deletions
|
|
@ -77,6 +77,9 @@ impl UserData for Paragraph {
|
|||
};
|
||||
Ok(ud)
|
||||
});
|
||||
methods.add_method("max_width", |_, me, ()| {
|
||||
Ok(me.text.lines.iter().take(me.area.height as usize).map(|l| l.width()).max())
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue