From adee9fb47997afb2ef3cf72a95beaa33770f38af Mon Sep 17 00:00:00 2001 From: sxyazi Date: Mon, 26 Jan 2026 17:22:39 +0800 Subject: [PATCH] fix: account for border when calculating message widths --- yazi-core/src/notify/message.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yazi-core/src/notify/message.rs b/yazi-core/src/notify/message.rs index 06581324..31ceb4df 100644 --- a/yazi-core/src/notify/message.rs +++ b/yazi-core/src/notify/message.rs @@ -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 }