summaryrefslogtreecommitdiff
path: root/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'widgets')
-rw-r--r--widgets/msgviewer.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/widgets/msgviewer.go b/widgets/msgviewer.go
index 19de4b8..7f24869 100644
--- a/widgets/msgviewer.go
+++ b/widgets/msgviewer.go
@@ -55,6 +55,7 @@ func NewMessageViewer(acct *AccountView, conf *config.AercConfig,
})
switcher := &PartSwitcher{}
+ switcher.selected = -1
err := createSwitcher(switcher, conf, store, msg, conf.Viewer.ShowHeaders)
if err != nil {
return &MessageViewer{
@@ -166,6 +167,7 @@ func createSwitcher(switcher *PartSwitcher, conf *config.AercConfig,
switcher.showHeaders = showHeaders
if len(msg.BodyStructure.Parts) == 0 {
+ switcher.selected = 0
pv, err := NewPartViewer(conf, store, msg, msg.BodyStructure,
showHeaders, []int{1})
if err != nil {