aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorTim Culverhouse <tim@timculverhouse.com>2022-10-26 11:05:23 -0500
committerRobin Jarry <robin@jarry.cc>2022-11-06 23:18:06 +0100
commit1f682fc610de1beb57c68b92fe98bf057483773c (patch)
treec5371883c50ffe2e9b8b7c505a288e54f4e03bdf /lib
parent59510c41c839004f037a20464f368c445a7a91d1 (diff)
downloadaerc-1f682fc610de1beb57c68b92fe98bf057483773c.tar.gz
msglist: style search results
Add option to style search results in the message list. Set default style for results. Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'lib')
-rw-r--r--lib/msgstore.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/msgstore.go b/lib/msgstore.go
index 085ca7f2..dfa25191 100644
--- a/lib/msgstore.go
+++ b/lib/msgstore.go
@@ -675,6 +675,16 @@ func (store *MessageStore) ApplySearch(results []uint32) {
store.NextResult()
}
+// IsResult returns true if uid is a search result
+func (store *MessageStore) IsResult(uid uint32) bool {
+ for _, hit := range store.results {
+ if hit == uid {
+ return true
+ }
+ }
+ return false
+}
+
func (store *MessageStore) SetFilter(args []string) {
store.filter = append(store.filter, args...)
}