aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
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...)
}