The LastSearchExpn was being compared, but was never set to the
expanded search value. This was causing the search to be recompiled
even if it were for the same previous expanded search string.
Co-authored-by: Richard Russon <rich@flatcap.org>
mutt_buffer_init(&err);
OptSearchInvalid = true;
mutt_str_strfcpy(LastSearch, buf, sizeof(LastSearch));
+ mutt_str_strfcpy(LastSearchExpn, mutt_b2s(tmp), sizeof(LastSearchExpn));
mutt_message(_("Compiling search pattern..."));
mutt_pattern_free(&SearchPattern);
err.dsize = 256;
mutt_error("%s", err.data);
FREE(&err.data);
LastSearch[0] = '\0';
+ LastSearchExpn[0] = '\0';
return -1;
}
FREE(&err.data);