implements ability to view headers in message view
This commit is contained in:
parent
2279ac3ab3
commit
b83e7c9fa6
6 changed files with 146 additions and 54 deletions
commands/msgview
25
commands/msgview/toggle-headers.go
Normal file
25
commands/msgview/toggle-headers.go
Normal file
|
@ -0,0 +1,25 @@
|
|||
package msgview
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"git.sr.ht/~sircmpwn/aerc/widgets"
|
||||
)
|
||||
|
||||
func init() {
|
||||
register("toggle-headers", ToggleHeaders)
|
||||
}
|
||||
|
||||
func toggleHeadersUsage(cmd string) error {
|
||||
return errors.New(fmt.Sprintf("Usage: %s", cmd))
|
||||
}
|
||||
|
||||
func ToggleHeaders(aerc *widgets.Aerc, args []string) error {
|
||||
if len(args) > 1 {
|
||||
return toggleHeadersUsage(args[0])
|
||||
}
|
||||
mv, _ := aerc.SelectedTab().(*widgets.MessageViewer)
|
||||
mv.ToggleHeaders()
|
||||
return nil
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue