fix(frames): don't pad empty pane title (#724)
This commit is contained in:
parent
645992483d
commit
c09e65383e
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue