09908828e61d24d8a8ea32db0a2fd19c7f8ea1e1
braney
  Mon Oct 9 10:16:21 2023 -0700
hgFind items always pass the bigBed filters and always are in pack when
we're doing squishyPack

diff --git src/hg/hgTracks/hgTracks.c src/hg/hgTracks/hgTracks.c
index 0050502..b059ba5 100644
--- src/hg/hgTracks/hgTracks.c
+++ src/hg/hgTracks/hgTracks.c
@@ -4784,31 +4784,35 @@
         squishTrack->tdb->originalTrack = squishTrack->tdb->track;
         squishTrack->tdb->track = cloneString(buffer);
         squishTrack->tdb->next = NULL;
         squishTrack->visibility = tvSquish;
         squishTrack->limitedVis = tvSquish;
         hashAdd(trackHash, squishTrack->tdb->track, squishTrack);
         struct linkedFeatures *lf = track->items;
 
         /* distribute the items based on squishyPackPoint */
         track->items = NULL;
         squishTrack->items = NULL;
         struct linkedFeatures *nextLf;
         for(; lf; lf = nextLf)
             {
             nextLf = lf->next;
-            if (lf->squishyPackVal > squishyPackPoint)
+
+            // if this is a hgFind match, it always is in pack, not squish
+            if ((hgFindMatches != NULL) && hashLookup(hgFindMatches, lf->name))
+                slAddHead(&track->items, lf);
+            else if (lf->squishyPackVal > squishyPackPoint)
                 slAddHead(&squishTrack->items, lf);
             else
                 slAddHead(&track->items, lf);
             }
 
         // if the squish track has no items, don't bother including it
         if (slCount(squishTrack->items) == 0)
             continue;
 
         slReverse(&track->items);
         slReverse(&squishTrack->items);
         
         squishTrack->track = cloneString(buffer);
         squishTrack->originalTrack = cloneString(track->track);
         squishTrack->shortLabel = cloneString(track->shortLabel);