From 5f57a9404f047615ee70c4d2570245df9ac3ef92 Mon Sep 17 00:00:00 2001 From: Tim Culverhouse Date: Tue, 27 Dec 2022 08:46:40 -0600 Subject: split: close split on update of split view Commit 6b8e0b19d35a ("split: refactor to prevent stuck splits") introduced a regression where a split message viewer is not closed when a new message is selected, leading to every split view staying open in the background. Fixes: 6b8e0b19d35a ("split: refactor to prevent stuck splits") Signed-off-by: Tim Culverhouse Acked-by: Robin Jarry --- widgets/account.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'widgets/account.go') diff --git a/widgets/account.go b/widgets/account.go index 19385014..8b3e6a18 100644 --- a/widgets/account.go +++ b/widgets/account.go @@ -506,6 +506,9 @@ func (acct *AccountView) updateSplitView(msg *models.MessageInfo) { acct.splitDebounce.Stop() } fn := func() { + if acct.split != nil { + acct.split.Close() + } lib.NewMessageStoreView(msg, false, acct.Store(), acct.aerc.Crypto, acct.aerc.DecryptKeys, func(view lib.MessageView, err error) { if err != nil { -- cgit