From 2ed2a833dadc22658bec4ba2478b051edfa6086f Mon Sep 17 00:00:00 2001 From: sxyazi Date: Thu, 5 Mar 2026 20:15:49 +0800 Subject: [PATCH] .. --- yazi-shim/src/ratatui/paragraph.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yazi-shim/src/ratatui/paragraph.rs b/yazi-shim/src/ratatui/paragraph.rs index 4f958170..8a66de49 100644 --- a/yazi-shim/src/ratatui/paragraph.rs +++ b/yazi-shim/src/ratatui/paragraph.rs @@ -11,7 +11,10 @@ where fn line_count_impl(mut text: Text<'_>, mut width: u16, indent: &str, wrap: Option) -> usize { width = width.max(1); - let Some(wrap) = wrap else { return 1 }; + + let Some(wrap) = wrap else { + return Paragraph::new(text).line_count(width); + }; if indent.len() == 1 { return Paragraph::new(text).wrap(wrap).line_count(width);