Skip to content

Commit

Permalink
fix(ui): clear filename statusbar value on event
Browse files Browse the repository at this point in the history
  • Loading branch information
aymanbagabas committed May 2, 2023
1 parent 2d5089e commit bdac20b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ui/pages/repo/files.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ""
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit bdac20b

Please sign in to comment.