if (!mf2.ptr)
                        return 0; /* ignore unmerged */
                /* created "two" -- does it have what we are looking for? */
-               hit = !regexec(regexp, p->two->data, 1, ®match, 0);
+               hit = !regexec(regexp, mf2.ptr, 1, ®match, 0);
        } else if (!mf2.ptr) {
                /* removed "one" -- did it have what we are looking for? */
-               hit = !regexec(regexp, p->one->data, 1, ®match, 0);
+               hit = !regexec(regexp, mf1.ptr, 1, ®match, 0);
        } else {
                /*
                 * We have both sides; need to run textual diff and see if
 {
        int err;
        regex_t regex;
+       int cflags = REG_EXTENDED | REG_NEWLINE;
 
-       err = regcomp(®ex, o->pickaxe, REG_EXTENDED | REG_NEWLINE);
+       if (DIFF_OPT_TST(o, PICKAXE_IGNORE_CASE))
+               cflags |= REG_ICASE;
+
+       err = regcomp(®ex, o->pickaxe, cflags);
        if (err) {
                char errbuf[1024];
                regerror(err, ®ex, errbuf, 1024);
                }
                regexp = ®ex;
        } else {
-               kws = kwsalloc(NULL);
+               kws = kwsalloc(DIFF_OPT_TST(o, PICKAXE_IGNORE_CASE)
+                              ? tolower_trans_tbl : NULL);
                kwsincr(kws, needle, len);
                kwsprep(kws);
        }