mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-21 23:01:05 +00:00
fix: account for border when calculating message widths (#3615)
This commit is contained in:
parent
92880b844b
commit
06c665a086
1 changed files with 1 additions and 1 deletions
|
|
@ -40,7 +40,7 @@ impl Message {
|
|||
pub fn height(&self, width: u16) -> usize {
|
||||
let lines = ratatui::widgets::Paragraph::new(self.content.as_str())
|
||||
.wrap(ratatui::widgets::Wrap { trim: false })
|
||||
.line_count(width);
|
||||
.line_count(width.saturating_sub(NOTIFY_BORDER));
|
||||
|
||||
lines + NOTIFY_BORDER as usize
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue