af3a143571e5aa064eab75c34f9444b35413b562
chmalee
  Tue Nov 30 15:28:15 2021 -0800
Add snippet support to trix searching. Required changing the
wordPos from the first highest matching wordIndex to the
wordIndex of the actual span. Have trixContextIndex create a
second level index for fast retrieval of line offsets in
original text file used by ixIxx. Create a simple UI for navigating
hgFind search results.

diff --git src/hg/lib/hgFindSpecCustom.c src/hg/lib/hgFindSpecCustom.c
index 0ef3beb..9251bc2 100644
--- src/hg/lib/hgFindSpecCustom.c
+++ src/hg/lib/hgFindSpecCustom.c
@@ -430,31 +430,31 @@
     specNameList = slNameNew("hgFindSpec");
 else
     slReverse(&specNameList);
 return specNameList;
 }
 
 static boolean haveSpecAlready(struct hgFindSpec *list, struct hgFindSpec *spec)
 /* Simply check to see if we have this search in our list already. */
 {
 struct hgFindSpec *cur = list;
 while ((cur != NULL) && (!sameString(cur->searchName, spec->searchName)))
     cur = cur->next;
 return (cur) ? TRUE : FALSE;
 }
 
-static int hgFindSpecPriCmp(const void *va, const void *vb)
+int hgFindSpecPriCmp(const void *va, const void *vb)
 /* Compare to sort by assending searchPriority. */
 {
 const struct hgFindSpec *a = *((struct hgFindSpec **)va);
 const struct hgFindSpec *b = *((struct hgFindSpec **)vb);
 float diff = a->searchPriority - b->searchPriority;
 if (diff < 0)
     return -1;
 else if (diff > 0)
     return 1;
 else
     return 0;
 }
 
 static struct hgFindSpec *loadFindSpecsTbl(char *db, char *tblSpec, char *where)
 /* Load find specs for the given where and a given tblSpec. where can be