aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--widgets/msgviewer.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/widgets/msgviewer.go b/widgets/msgviewer.go
index c15187ae..ea28165e 100644
--- a/widgets/msgviewer.go
+++ b/widgets/msgviewer.go
@@ -528,7 +528,7 @@ const copying int32 = 1
func NewPartViewer(acct *AccountView, conf *config.AercConfig,
msg lib.MessageView, part *models.BodyStructure,
- index []int,
+ curindex []int,
) (*PartViewer, error) {
var (
filter *exec.Cmd
@@ -618,6 +618,9 @@ func NewPartViewer(acct *AccountView, conf *config.AercConfig,
{Strategy: ui.SIZE_WEIGHT, Size: ui.Const(1)},
})
+ index := make([]int, len(curindex))
+ copy(index, curindex)
+
pv := &PartViewer{
conf: conf,
acctConfig: acct.AccountConfig(),