aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/account.go
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/account.go')
-rw-r--r--widgets/account.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/widgets/account.go b/widgets/account.go
index 3bf104bd..6cf49aa1 100644
--- a/widgets/account.go
+++ b/widgets/account.go
@@ -126,7 +126,9 @@ func (acct *AccountView) SetStatus(setters ...statusline.SetStateFunc) {
}
func (acct *AccountView) UpdateStatus() {
- acct.host.SetStatus(acct.state.StatusLine(acct.SelectedDirectory()))
+ if acct.isSelected() {
+ acct.host.SetStatus(acct.state.StatusLine(acct.SelectedDirectory()))
+ }
}
func (acct *AccountView) PushStatus(status string, expiry time.Duration) {
@@ -226,6 +228,10 @@ func (acct *AccountView) SelectedMessagePart() *PartInfo {
return nil
}
+func (acct *AccountView) isSelected() bool {
+ return acct.aerc.NumTabs() > 0 && acct == acct.aerc.SelectedAccount()
+}
+
func (acct *AccountView) onMessage(msg types.WorkerMessage) {
switch msg := msg.(type) {
case *types.Done: