summary refs log tree commit diff stats
path: root/commands
diff options
context:
space:
mode:
Diffstat (limited to 'commands')
-rw-r--r--commands/msg/copy.go13
1 files changed, 6 insertions, 7 deletions
diff --git a/commands/msg/copy.go b/commands/msg/copy.go
index 48b296c..30022f1 100644
--- a/commands/msg/copy.go
+++ b/commands/msg/copy.go
@@ -44,17 +44,16 @@ func (Copy) Execute(aerc *widgets.Aerc, args []string) error {
 			createParents = true
 		}
 	}
-
-	widget := aerc.SelectedTab().(widgets.ProvidesMessage)
-	store := widget.Store()
-	if store == nil {
-		return errors.New("Cannot perform action. Messages still loading")
+	h := newHelper(aerc)
+	uids, err := h.uids()
+	if err != nil {
+		return err
 	}
-	msg, err := widget.SelectedMessage()
+	store, err := h.store()
 	if err != nil {
 		return err
 	}
-	store.Copy([]uint32{msg.Uid}, strings.Join(args[optind:], " "),
+	store.Copy(uids, strings.Join(args[optind:], " "),
 		createParents, func(
 			msg types.WorkerMessage) {
 
d9a'>cc03f6f ^
3a5b4c2 ^
0897407 ^
cc03f6f ^
25f21b5 ^
61f1b22 ^



25f21b5 ^
cce7cb4 ^




25f21b5 ^

3a5b4c2 ^
cc03f6f ^
0897407 ^

3a5b4c2 ^
0897407 ^




fd0265d ^
0897407 ^


cc03f6f ^
61f1b22 ^








0e9c411 ^

94b9d55 ^
0e9c411 ^



0e9c411 ^
94b9d55 ^


















0e9c411 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80