Cleanup pager processes after closing a msgviewer

A pager is spawned every time an email is viewed but not killed off when
quitting the msgviewer, thus leading to process leakage. This patch
fixes this by adding a Close method to the msgview widget, which is
called in the close command.

Signed-off-by: Kevin Kuehler <keur@xcf.berkeley.edu>
This commit is contained in:
Kevin Kuehler 2019-10-15 02:01:47 -07:00 committed by Drew DeVault
parent 550ef0bc1f
commit be4ea0d96b
2 changed files with 18 additions and 0 deletions
commands/msgview

View file

@ -25,6 +25,7 @@ func (Close) Execute(aerc *widgets.Aerc, args []string) error {
return errors.New("Usage: close")
}
mv, _ := aerc.SelectedTab().(*widgets.MessageViewer)
mv.Close()
aerc.RemoveTab(mv)
return nil
}