summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--config/aerc.conf.in2
-rw-r--r--config/triggers.go2
-rw-r--r--doc/aerc-config.5.scd2
-rw-r--r--lib/format/format.go9
-rw-r--r--widgets/msglist.go2
5 files changed, 11 insertions, 6 deletions
diff --git a/config/aerc.conf.in b/config/aerc.conf.in
index 5feeac0..39548cd 100644
--- a/config/aerc.conf.in
+++ b/config/aerc.conf.in
@@ -7,7 +7,7 @@
 # with mutt's printf-like syntax.
 #
 # Default:
-index-format=%D %-17.17n %s
+index-format=%D %-17.17n %Z %s
 
 #
 # See time.Time#Format at https://godoc.org/time#Time.Format
diff --git a/config/triggers.go b/config/triggers.go
index f68cb58..3187cf7 100644
--- a/config/triggers.go
+++ b/config/triggers.go
@@ -39,7 +39,7 @@ func (trig *TriggersConfig) ExecNewEmail(account *AccountConfig,
 			formatstr, args, err := format.ParseMessageFormat(
 				account.From,
 				part,
-				conf.Ui.TimestampFormat, account.Name, 0, msg)
+				conf.Ui.TimestampFormat, account.Name, 0, msg, false)
 			if err != nil {
 				return "", err
 			}
diff --git a/doc/aerc-config.5.scd b/doc/aerc-config.5.scd
index 615c3ab..1d6294e 100644
--- a/doc/aerc-config.5.scd
+++ b/doc/aerc-config.5.scd
@@ -78,7 +78,7 @@ These options are configured in the *[ui]* section of aerc.conf.
 |  %v
 :  sender first name (e.g. "Alex" in "Alex Smith <smith@example.net>")
 |  %Z
-:  flags (O=old, N=new, r=answered, D=deleted, !=flagged)
+:  flags (O=old, N=new, r=answered, D=deleted, !=flagged, \*=marked)
 
 *timestamp-format*
 	See time.Time#Format at https://godoc.org/time#Time.Format
diff --git a/lib/format/format.go b/lib/format/format.go
index 53d93aa..6d638c6 100644
--- a/lib/format/format.go
+++ b/lib/format/format.go
@@ -22,7 +22,8 @@ func parseAddress(address string) *gomail.Address {
 func ParseMessageFormat(
 	fromAddress string,
 	format string, timestampformat string,
-	accountName string, number int, msg *models.MessageInfo) (string,
+	accountName string, number int, msg *models.MessageInfo,
+	marked bool) (string,
 	[]interface{}, error) {
 	retval := make([]byte, 0, len(format))
 	var args []interface{}
@@ -202,6 +203,7 @@ func ParseMessageFormat(
 			var readReplyFlag = ""
 			var delFlag = ""
 			var flaggedFlag = ""
+			var markedFlag = ""
 			seen := false
 			recent := false
 			answered := false
@@ -233,8 +235,11 @@ func ParseMessageFormat(
 					readReplyFlag = "O" // message is old
 				}
 			}
+			if marked {
+				markedFlag = "*"
+			}
 			retval = append(retval, '3', 's')
-			args = append(args, readReplyFlag+delFlag+flaggedFlag)
+			args = append(args, readReplyFlag+delFlag+flaggedFlag+markedFlag)
 
 		// Move the below cases to proper alphabetical positions once
 		// implemented
diff --git a/widgets/msglist.go b/widgets/msglist.go
index aed3ed5..243c5db 100644
--- a/widgets/msglist.go
+++ b/widgets/msglist.go
@@ -109,7 +109,7 @@ func (ml *MessageList) Draw(ctx *ui.Context) {
 		fmtStr, args, err := format.ParseMessageFormat(
 			ml.aerc.SelectedAccount().acct.From,
 			ml.conf.Ui.IndexFormat,
-			ml.conf.Ui.TimestampFormat, "", i, msg)
+			ml.conf.Ui.TimestampFormat, "", i, msg, store.IsMarked(uid))
 		if err != nil {
 			ctx.Printf(0, row, style, "%v", err)
 		} else {
^
439e15d ^




439e15d ^


26e134b ^

439e15d ^
















































439e15d ^









439e15d ^











0053620 ^

439e15d ^



















439e15d ^


0053620 ^

439e15d ^
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187