From 06c665a086538d9d7b637785c6410a49d8bd85cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E9=9B=85=20misaki=20masa?= Date: Mon, 26 Jan 2026 17:23:57 +0800 Subject: [PATCH] fix: account for border when calculating message widths (#3615) --- 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 }