summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--commands/msg/reply.go31
-rw-r--r--commands/msg/utils.go32
2 files changed, 32 insertions, 31 deletions
diff --git a/commands/msg/reply.go b/commands/msg/reply.go
index e4c4577..762c15e 100644
--- a/commands/msg/reply.go
+++ b/commands/msg/reply.go
@@ -196,34 +196,3 @@ func (reply) Execute(aerc *widgets.Aerc, args []string) error {
 		return addTab()
 	}
 }
-
-func findPlaintext(bs *models.BodyStructure, path []int) []int {
-	for i, part := range bs.Parts {
-		cur := append(path, i+1)
-		if strings.ToLower(part.MIMEType) == "text" &&
-			strings.ToLower(part.MIMESubType) == "plain" {
-			return cur
-		}
-		if strings.ToLower(part.MIMEType) == "multipart" {
-			if path := findPlaintext(part, cur); path != nil {
-				return path
-			}
-		}
-	}
-	return nil
-}
-
-func findFirstNonMultipart(bs *models.BodyStructure, path []int) []int {
-	for i, part := range bs.Parts {
-		cur := append(path, i+1)
-		mimetype := strings.ToLower(part.MIMEType)
-		if mimetype != "multipart" {
-			return path
-		} else if mimetype == "multipart" {
-			if path := findPlaintext(part, cur); path != nil {
-				return path
-			}
-		}
-	}
-	return nil
-}
diff --git a/commands/msg/utils.go b/commands/msg/utils.go
index cad0f82..5eb5fe5 100644
--- a/commands/msg/utils.go
+++ b/commands/msg/utils.go
@@ -2,6 +2,7 @@ package msg
 
 import (
 	"errors"
+	"strings"
 
 	"git.sr.ht/~sircmpwn/aerc/commands"
 	"git.sr.ht/~sircmpwn/aerc/lib"
@@ -48,3 +49,34 @@ func (h *helper) messages() ([]*models.MessageInfo, error) {
 	}
 	return commands.MsgInfoFromUids(store, uid)
 }
+
+func findPlaintext(bs *models.BodyStructure, path []int) []int {
+	for i, part := range bs.Parts {
+		cur := append(path, i+1)
+		if strings.ToLower(part.MIMEType) == "text" &&
+			strings.ToLower(part.MIMESubType) == "plain" {
+			return cur
+		}
+		if strings.ToLower(part.MIMEType) == "multipart" {
+			if path := findPlaintext(part, cur); path != nil {
+				return path
+			}
+		}
+	}
+	return nil
+}
+
+func findFirstNonMultipart(bs *models.BodyStructure, path []int) []int {
+	for i, part := range bs.Parts {
+		cur := append(path, i+1)
+		mimetype := strings.ToLower(part.MIMEType)
+		if mimetype != "multipart" {
+			return path
+		} else if mimetype == "multipart" {
+			if path := findPlaintext(part, cur); path != nil {
+				return path
+			}
+		}
+	}
+	return nil
+}
+0100 misc changes, make install' href='/akspecs/ranger/commit/Makefile?h=v1.1.0&id=94c5d83e6752cf6506c78c9454c08b9f3df9371c'>94c5d83e ^
423ce88a ^

94c5d83e ^








e9e4b4ff ^

50a0cb1c ^
e9e4b4ff ^

90416a69 ^
e9e4b4ff ^
fde932f2 ^
75682d43 ^
e9e4b4ff ^

2c5ea01d ^
e9e4b4ff ^




e9e4b4ff ^

2c5ea01d ^
e9e4b4ff ^
0c2c782d ^

30ae2137 ^
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
81
82
83
84
85
86
87
88
89
90
91
92