about summary refs log tree commit homepage
path: root/lib/PublicInbox/LeiXSearch.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/PublicInbox/LeiXSearch.pm')
-rw-r--r--lib/PublicInbox/LeiXSearch.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/PublicInbox/LeiXSearch.pm b/lib/PublicInbox/LeiXSearch.pm
index 3270b420..f2c8c02e 100644
--- a/lib/PublicInbox/LeiXSearch.pm
+++ b/lib/PublicInbox/LeiXSearch.pm
@@ -148,7 +148,7 @@ sub query_thread_mset { # for --threads
         my $mset;
         my $each_smsg = $lei->{ovv}->ovv_each_smsg_cb($lei, $ibxish);
         my $can_kw = !!$ibxish->can('msg_keywords');
-        my $fl = $lei->{opt}->{threads} > 1;
+        my $fl = $lei->{opt}->{threads} > 1 ? [ 'flagged' ] : undef;
         do {
                 $mset = $srch->mset($mo->{qstr}, $mo);
                 mset_progress($lei, $desc, $mset->size,
@@ -165,8 +165,8 @@ sub query_thread_mset { # for --threads
                                 if ($mitem) {
                                         if ($can_kw) {
                                                 mitem_kw($smsg, $mitem, $fl);
-                                        } else {
-                                                $smsg->{kw} = [ 'flagged' ];
+                                        } elsif ($fl) {
+                                                $smsg->{kw} = $fl;
                                         }
                                 }
                                 $each_smsg->($smsg, $mitem);