When wrapping lines of text, limit the maximum width.

- Limit the maximum width of text columns to improve readability.

  - Fixes #239.
This commit is contained in:
Neal H. Walfield 2024-04-12 14:59:03 +02:00
parent 9cefdf6b6a
commit e9b502a258
No known key found for this signature in database
GPG Key ID: 6863C9AD5B4D22D3

View File

@ -44,6 +44,9 @@ fn options() -> textwrap::Options<'static> {
let width =
terminal_size::terminal_size().map(|(w, _h)| w.0)
.unwrap_or(80)
// To improve readability limit the width of the text
// columns.
.min(100)
.into();
textwrap::Options::new(width)