~sircmpwn/aerc

select next message when deleting from message viewer v1 PROPOSED

Aditya Srivastava: 1
 select next message when deleting from message viewer

 1 files changed, 10 insertions(+), 3 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~sircmpwn/aerc/patches/7257/mbox | git am -3
Learn more about email & git

[PATCH] select next message when deleting from message viewer Export this patch

From: Aditya Srivastava <adityasri163@gmail.com>

---
 commands/msg/delete.go | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/commands/msg/delete.go b/commands/msg/delete.go
index 55d7f68..06cef9c 100644
--- a/commands/msg/delete.go
+++ b/commands/msg/delete.go
@@ -43,11 +43,18 @@ func (_ Delete) Execute(aerc *widgets.Aerc, args []string) error {
		return err
	}
	_, isMsgView := widget.(*widgets.MessageViewer)
	mv, _ := aerc.SelectedTab().(*widgets.MessageViewer)
	store.Next()
	if isMsgView {
		aerc.RemoveTab(widget)
		nextMsg := store.Selected()
		if nextMsg == msg {
			aerc.RemoveTab(widget)
			acct.Messages().Scroll()
		} else {
			nextMv := widgets.NewMessageViewer(acct, aerc.Config(), store, nextMsg)
			aerc.ReplaceTab(mv, nextMv, nextMsg.Envelope.Subject)
		}
	}
	store.Next()
	acct.Messages().Scroll()
	store.Delete([]uint32{msg.Uid}, func(msg types.WorkerMessage) {
		switch msg := msg.(type) {
		case *types.Done:
-- 
2.22.0
Thanks!

To git.sr.ht:~sircmpwn/aerc
   c9a909f..b72bb27  master -> master
View this thread in the archives