From e1871db6d35ea14228d41d7237e1ff8e6cda4211 Mon Sep 17 00:00:00 2001 From: Tim Adler Date: Tue, 24 May 2022 14:05:39 +0200 Subject: [PATCH] fix: padding in titlebar when nothing is displayed (#139) * Don't render anything, when nothing is shown * fix linter issue --- list/list.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/list/list.go b/list/list.go index 4e2ec2d..aace11c 100644 --- a/list/list.go +++ b/list/list.go @@ -1036,7 +1036,10 @@ func (m Model) titleView() string { } } - return titleBarStyle.Render(view) + if len(view) > 0 { + return titleBarStyle.Render(view) + } + return view } func (m Model) statusView() string {