From: Simon Tatham Date: Wed, 27 Dec 2023 14:32:41 +0000 (+0000) Subject: Forgot to wrap overlong lines. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=4c1aa58396974b34efbcb5336ab296ded7497173;p=mastodonochrome.git Forgot to wrap overlong lines. --- diff --git a/src/main.rs b/src/main.rs index 538f1b8..4bc57be 100644 --- a/src/main.rs +++ b/src/main.rs @@ -186,8 +186,10 @@ fn tui(paras: Vec) -> std::io::Result<()> { let mut y = 0; for para in ¶s { for line in para.render(area.width as usize) { - ratatui_set_string(buf, y, 0, &line.slice()); - y += 1; + for line in line.split(area.width as usize) { + ratatui_set_string(buf, y, 0, &line); + y += 1; + } } } })?;