*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
menu->make_entry (s, l, menu, i);
}
menu->make_entry (s, l, menu, i);
}
{
int tmp, neg = (jumplen >= 0) ? 0 : -1;
int c = MIN (MenuContext, menu->pagelen / 2);
{
int tmp, neg = (jumplen >= 0) ? 0 : -1;
int c = MIN (MenuContext, menu->pagelen / 2);
return (regexec (re, buf, 0, NULL, 0));
}
return (regexec (re, buf, 0, NULL, 0));
}
-MUTTMENU *mutt_new_menu (void)
+void mutt_menu_init (void)
+{
+ int i;
+
+ for (i = 0; i < MENU_MAX; i++)
+ SearchBuffers[i] = NULL;
+}
+
+MUTTMENU *mutt_new_menu (int menu)
if (mutt_get_field ((op == OP_SEARCH) ? _("Search for: ") :
_("Reverse search for: "),
buf, sizeof (buf), M_CLEAR) != 0 || !buf[0])
return (-1);
if (mutt_get_field ((op == OP_SEARCH) ? _("Search for: ") :
_("Reverse search for: "),
buf, sizeof (buf), M_CLEAR) != 0 || !buf[0])
return (-1);
- mutt_str_replace (&menu->searchBuf, buf);
+ if (menu->menu >= 0 && menu->menu < MENU_MAX)
+ {
+ mutt_str_replace (&SearchBuffers[menu->menu], buf);
+ searchBuf = SearchBuffers[menu->menu];
+ }
{
regerror (r, &re, buf, sizeof (buf));
regfree (&re);
{
regerror (r, &re, buf, sizeof (buf));
regfree (&re);
while (r >= 0 && r < menu->max)
{
if (menu->search (menu, &re, r) == 0)
while (r >= 0 && r < menu->max)
{
if (menu->search (menu, &re, r) == 0)