From 34090580a068f89dfaf13aaf2a4e5bed51080eb9 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Thu, 31 Mar 2022 07:50:34 -0700 Subject: [PATCH] tabbar: default to a dummy, non-empty state This is to avoid computing a zero height initial tab bar as discussed in https://github.com/wez/wezterm/commit/808d7df8d44f489680bd704d77fe23e5951cc79d#commitcomment-69980693 cc: @davidrios --- wezterm-gui/src/tabbar.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wezterm-gui/src/tabbar.rs b/wezterm-gui/src/tabbar.rs index 93e0dd8b2..3c316022e 100644 --- a/wezterm-gui/src/tabbar.rs +++ b/wezterm-gui/src/tabbar.rs @@ -159,7 +159,12 @@ impl TabBarState { pub fn default() -> Self { Self { line: Line::with_width(1, SEQ_ZERO), - items: vec![], + items: vec![TabEntry { + item: TabBarItem::None, + title: Line::from_text(" ", &CellAttributes::blank(), 1), + x: 1, + width: 1, + }], } }