diff options
author | Jeffas <dev@jeffas.io> | 2019-07-17 22:09:35 +0100 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-07-17 17:31:49 -0400 |
commit | 1d1fe7c7ef42a4d85121f7b5a14376743876f080 (patch) | |
tree | c99226b58286ba92bc98a28f17d5c1a49ffa1b84 /widgets/msgviewer.go | |
parent | 6473848d87de099b31812f20c7eb181d5c0c3c51 (diff) | |
download | aerc-1d1fe7c7ef42a4d85121f7b5a14376743876f080.tar.gz |
Ensure new partswitcher doesn't start on multipart
Diffstat (limited to 'widgets/msgviewer.go')
-rw-r--r-- | widgets/msgviewer.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/widgets/msgviewer.go b/widgets/msgviewer.go index 19de4b83..7f248698 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 { |