From bdac20b13740956e40d4ffdd31052825489a83be Mon Sep 17 00:00:00 2001 From: Ayman Bagabas Date: Mon, 10 Apr 2023 14:07:34 -0400 Subject: [PATCH] fix(ui): clear filename statusbar value on event --- ui/pages/repo/files.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ui/pages/repo/files.go b/ui/pages/repo/files.go index d634bc9a1..edae23f1f 100644 --- a/ui/pages/repo/files.go +++ b/ui/pages/repo/files.go @@ -265,6 +265,8 @@ func (f *Files) Update(msg tea.Msg) (tea.Model, tea.Cmd) { } } } + case selector.ActiveMsg: + cmds = append(cmds, updateStatusBarCmd) case EmptyRepoMsg: f.ref = nil f.path = "" @@ -307,7 +309,8 @@ func (f *Files) View() string { func (f *Files) StatusBarValue() string { p := f.path if p == "." { - return "" + // FIXME: this is a hack to force clear the status bar value + return " " } return p }