diff options
author | Paulo Coelho <9609090+prscoelho@users.noreply.github.com> | 2021-09-15 09:48:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-15 10:48:16 +0200 |
commit | c09e65383ea5bbadc149cf8804d07807434a6632 (patch) | |
tree | 69c80293899c27c94bfaefb42366a367c8593543 /zellij-server/src/ui | |
parent | 645992483d9ae0cc239e76cce8e34fd6621f2f6d (diff) |
fix(frames): don't pad empty pane title (#724)
Diffstat (limited to 'zellij-server/src/ui')
-rw-r--r-- | zellij-server/src/ui/pane_boundaries_frame.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/zellij-server/src/ui/pane_boundaries_frame.rs b/zellij-server/src/ui/pane_boundaries_frame.rs index 493441496..a283a6b3b 100644 --- a/zellij-server/src/ui/pane_boundaries_frame.rs +++ b/zellij-server/src/ui/pane_boundaries_frame.rs @@ -52,7 +52,7 @@ impl PaneFrame { let middle_truncated_sign = "[..]"; let middle_truncated_sign_long = "[...]"; let full_text = format!(" {} ", &self.title); - if max_length <= 6 { + if max_length <= 6 || self.title.is_empty() { None } else if full_text.width() <= max_length { Some(full_text) |