diff options
author | Aram Drevekenin <aram@poor.dev> | 2022-04-29 10:30:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-29 10:30:30 +0200 |
commit | 640d1058a4fcf6df93af9dc391c412236afc5a6b (patch) | |
tree | 510b408130f40358003efe14c80b400f06a247ad /zellij-server/src/ui | |
parent | 8984d1eef654566d14396afae754574aec2ee6d8 (diff) |
Fix title widechar overflow (#1361)
* fix(ui): make sure wide characters don't cause a title overflow
* style(fmt): rustfmt
Diffstat (limited to 'zellij-server/src/ui')
-rw-r--r-- | zellij-server/src/ui/pane_boundaries_frame.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/zellij-server/src/ui/pane_boundaries_frame.rs b/zellij-server/src/ui/pane_boundaries_frame.rs index 22812cb3a..905c3b87b 100644 --- a/zellij-server/src/ui/pane_boundaries_frame.rs +++ b/zellij-server/src/ui/pane_boundaries_frame.rs @@ -312,10 +312,7 @@ impl PaneFrame { if max_length <= 6 || self.title.is_empty() { None } else if full_text.width() <= max_length { - Some(( - foreground_color(&full_text, self.color), - full_text.chars().count(), - )) + Some((foreground_color(&full_text, self.color), full_text.width())) } else { let length_of_each_half = (max_length - middle_truncated_sign.width()) / 2; |