From 5c9c6e9d98db7c7e807138d7644308a30598de79 Mon Sep 17 00:00:00 2001 From: Joscha Date: Mon, 1 Aug 2022 19:13:47 +0200 Subject: [PATCH] Fix word wrapping inside VJoins --- src/ui/widgets/editor.rs | 2 +- src/ui/widgets/text.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ui/widgets/editor.rs b/src/ui/widgets/editor.rs index 79646af..a707547 100644 --- a/src/ui/widgets/editor.rs +++ b/src/ui/widgets/editor.rs @@ -279,7 +279,7 @@ impl Widget for Editor { let min_width = lines .iter() - .map(|l| frame.width(l.text())) + .map(|l| frame.width(l.text().trim_end())) .max() .unwrap_or(0) + 1; diff --git a/src/ui/widgets/text.rs b/src/ui/widgets/text.rs index 43a9770..7cab2bb 100644 --- a/src/ui/widgets/text.rs +++ b/src/ui/widgets/text.rs @@ -40,7 +40,7 @@ impl Widget for Text { let lines = self.wrapped(frame, max_width); let min_width = lines .iter() - .map(|l| frame.width(l.text())) + .map(|l| frame.width(l.text().trim_end())) .max() .unwrap_or(0); let min_height = lines.len();