48#define MUTT_SEARCH_UP 1
49#define MUTT_SEARCH_DOWN 2
68 if (!(search_buf && *search_buf) || ((op != OP_SEARCH_NEXT) && (op != OP_SEARCH_OPPOSITE)))
70 buf_strcpy(buf, search_buf && (search_buf[0] !=
'\0') ? search_buf :
"");
71 if ((
mw_get_field(((op == OP_SEARCH) || (op == OP_SEARCH_NEXT)) ?
_(
"Search for: ") :
_(
"Reverse search for: "),
82 menu->
search_dir = ((op == OP_SEARCH) || (op == OP_SEARCH_NEXT)) ?
88 if (op == OP_SEARCH_OPPOSITE)
89 search_dir = -search_dir;
94 rc =
REG_COMP(&re, search_buf, REG_NOSUB | flags);
105 rc = menu->
current + search_dir;
109 while ((rc >= 0) && (rc < menu->max))
111 if (menu->
search(menu, &re, rc) == 0)
121 if (c_wrap_search && (wrap++ == 0))
123 rc = (search_dir == 1) ? 0 : menu->
max - 1;
148 case OP_CURRENT_BOTTOM:
152 case OP_CURRENT_MIDDLE:
220 int index =
search(menu, op);
248 const int digit = op - OP_JUMP;
259 if (mutt_str_atoi_full(
buf_string(buf), &n) && (n > 0) && (n < (menu->
max + 1)))
320 if (!win || !win->
wdata)
bool buf_is_empty(const struct Buffer *buf)
Is the Buffer empty?
size_t buf_strcpy(struct Buffer *buf, const char *s)
Copy a string into a Buffer.
static const char * buf_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
bool cs_subset_bool(const struct ConfigSubset *sub, const char *name)
Get a boolean config item by name.
Convenience wrapper for the config headers.
Convenience wrapper for the core headers.
void mutt_unget_ch(int ch)
Return a keystroke to the input buffer.
const char * dispatcher_get_retval_name(int rv)
Get the name of a return value.
@ FR_SUCCESS
Valid function - successfully performed.
@ FR_UNKNOWN
Unknown function.
int menu_function_dispatcher(struct MuttWindow *win, int op)
Perform a Menu function - Implements function_dispatcher_t -.
static int op_help(struct EnterWindowData *wdata, int op)
Display Help - Implements enter_function_t -.
int mw_get_field(const char *prompt, struct Buffer *buf, CompletionFlags complete, enum HistoryClass hclass, const struct CompleteOps *comp_api, void *cdata)
Ask the user for a string -.
static int op_jump(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
Jump to an index number - Implements index_function_t -.
#define mutt_message(...)
#define mutt_debug(LEVEL,...)
Convenience wrapper for the gui headers.
void mutt_help(enum MenuType menu)
Display the help menu.
Read/write command history from/to a file.
@ HC_OTHER
Miscellaneous strings.
@ LL_DEBUG1
Log at debug level 1.
bool mutt_mb_is_lower(const char *s)
Does a multi-byte string contain only lowercase characters?
Convenience wrapper for the library headers.
char * mutt_str_replace(char **p, const char *s)
Replace one string with another.
Many unsorted constants and some structs.
#define MUTT_COMP_NO_FLAGS
No flags are set.
#define MUTT_COMP_CLEAR
Clear input if printable character is pressed.
const char * opcodes_get_name(int op)
Get the name of an opcode.
struct Buffer * buf_pool_get(void)
Get a Buffer from the pool.
void buf_pool_release(struct Buffer **ptr)
Return a Buffer to the pool.
Prototypes for many functions.
#define REG_COMP(preg, regex, cflags)
Compile a regular expression.
String manipulation buffer.
size_t dsize
Length of data.
char * data
Pointer to data.
void * wdata
Private data.