We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aa36a23 commit 75fb80fCopy full SHA for 75fb80f
helix-term/src/ui/text.rs
@@ -58,7 +58,7 @@ pub fn required_size(text: &tui::text::Text, max_text_width: u16) -> (u16, u16)
58
let content_width = content.width() as u16;
59
if content_width > max_text_width {
60
text_width = max_text_width;
61
- height += content_width / max_text_width;
+ height += content_width.checked_div(max_text_width).unwrap_or(0);
62
} else if content_width > text_width {
63
text_width = content_width;
64
}
0 commit comments