67 {
"search-toggle", OP_SEARCH_TOGGLE },
68 {
"skip-headers", OP_PAGER_SKIP_HEADERS },
69 {
"skip-quoted", OP_PAGER_SKIP_QUOTED },
70 {
"toggle-quoted", OP_PAGER_HIDE_QUOTED },
87 { OP_MAIN_NEXT_UNDELETED,
"<right>" },
88 { OP_MAIN_PREV_UNDELETED,
"<left>" },
89 { OP_NEXT_LINE,
"<keypadenter>" },
90 { OP_NEXT_LINE,
"\n" },
91 { OP_NEXT_LINE,
"\r" },
92 { OP_NEXT_PAGE,
" " },
93 { OP_PAGER_HIDE_QUOTED,
"T" },
94 { OP_PAGER_SKIP_HEADERS,
"H" },
95 { OP_PAGER_SKIP_QUOTED,
"S" },
96 { OP_FIRST_ENTRY,
"^" },
97 { OP_PREV_LINE,
"<backspace>" },
98 { OP_PREV_PAGE,
"-" },
100 { OP_SEARCH_TOGGLE,
"\\" },
111 struct SubMenu *sm_pager = NULL;
156 while ((cur > 0) && (nlines > 0))
177 while ((cur < max) && (nlines > 0))
180 if ((cur < max) && (!hiding || !
COLOR_QUOTED(info[cur].cid)))
267 if (event->
count > 0)
269 int advance =
event->count * (rows / 2);
279 else if (c_pager_stop)
282 if (event->
count == 0)
306 int n =
MAX(event->
count, 1) * (rows / 2 + rows % 2);
310 else if (event->
count == 0)
352 else if (event->
count == 0)
370 if (event->
count > 0)
383 else if (c_pager_stop)
386 if (event->
count == 0)
412 else if (event->
count == 0)
428 if (event->
count == 0)
460 const int op =
event->op;
461 if (
mw_get_field(((op == OP_SEARCH) || (op == OP_SEARCH_NEXT)) ?
_(
"Search for: ") :
_(
"Reverse search for: "),
471 struct KeyEvent event_s = { 0, OP_NULL };
475 event_s.
op = OP_SEARCH_NEXT;
477 event_s.
op = OP_SEARCH_OPPOSITE;
492 else if (
op == OP_SEARCH_REVERSE)
511 for (
size_t i = 0; i < priv->
lines_max; i++)
539 for (i = priv->
top_line; i >= 0; i--)
555 for (i = priv->
top_line; i < priv->lines_used; i++)
564 if (i < priv->lines_used)
617 const int op =
event->op;
620 if ((!priv->
search_back && (op == OP_SEARCH_NEXT)) ||
641 else if (priv->
wrapped || !c_wrap_search)
673 else if (priv->
wrapped || !c_wrap_search)
718 while (((new_topline < priv->lines_used) ||
753 const short c_pager_skip_quoted_context =
cs_subset_number(fdata->
n->
sub,
"pager_skip_quoted_context");
761 while (((new_topline < priv->lines_used) ||
777 if (c_pager_skip_quoted_context > 0)
779 while (((new_topline < priv->lines_used) ||
795 if (num_quoted <= c_pager_skip_quoted_context)
799 while (((new_topline < priv->lines_used) ||
813 while (((new_topline < priv->lines_used) ||
828 priv->
top_line = new_topline -
MIN(c_pager_skip_quoted_context, num_quoted);
845 const int count =
MAX(event->
count, 1);
847 for (
int i = 0; i < count; i++)
921 FILE *fp_save = NULL;
925 long pos = ftell(priv->
fp);
1073 if (!dlg || !dlg->
wdata)
1079 const int op =
event->op;
1086 .shared = dlg->
wdata,
GUI display the mailboxes in a side panel.
const struct CompleteOps CompleteFileOps
Auto-Completion of Files.
Select a Mailbox from a list.
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".
Color and attribute parsing.
short cs_subset_number(const struct ConfigSubset *sub, const char *name)
Get a number config item by name.
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.
struct MuttWindow * dialog_find(struct MuttWindow *win)
Find the parent Dialog of a Window.
const char * dispatcher_get_retval_name(int rv)
Get the name of a return value.
void dispatcher_flush_on_error(int rv)
Flush pending keys after a dispatch error.
@ FR_SUCCESS
Valid function - successfully performed.
@ FR_DONE
Exit the Dialog.
@ FR_UNKNOWN
Unknown function.
@ FR_ERROR
Valid function - error occurred.
@ FR_NOT_IMPL
Invalid function - feature not enabled.
@ FR_NO_ACTION
Valid function - no action performed.
bool color_is_header(enum ColorId cid)
Colour is for an Email header.
int display_line(FILE *fp, LOFF_T *bytes_read, struct Line **lines, int line_num, int *lines_used, int *lines_max, PagerFlags flags, struct QuoteStyle **quote_list, int *q_level, bool *force_redraw, regex_t *search_re, struct MuttWindow *win_pager, struct AttrColorList *ansi_list)
Print a line on screen.
@ MUTT_COMP_CLEAR
Clear input if printable character is pressed.
Structs that make up an email.
int mutt_file_copy_stream(FILE *fp_in, FILE *fp_out)
Copy the contents of one file into another.
bool mutt_file_seek(FILE *fp, LOFF_T offset, int whence)
Wrapper for fseeko with error handling.
#define mutt_file_fclose(FP)
#define mutt_file_fopen(PATH, MODE)
void mutt_flushinp(void)
MacroEvents moved to KeyModuleData UngetKeyEvents moved to KeyModuleData.
void mutt_push_macro_event(int ch, int op)
Add the character/operation to the macro buffer.
@ MFF_DEPRECATED
Function is deprecated.
static int op_quit(struct AliasFunctionData *fdata, const struct KeyEvent *event)
Save changes and exit this dialog - Implements alias_function_t -.
int pager_function_dispatcher(struct MuttWindow *win, const struct KeyEvent *event)
Perform a Pager function - Implements function_dispatcher_t -.
static int op_help(struct EnterFunctionData *fdata, const struct KeyEvent *event)
Display Help - Implements enter_function_t -.
void dlg_attach(struct ConfigSubset *sub, struct MailboxView *mv, struct Email *e, FILE *fp, bool attach_msg)
Show the attachments in a Menu -.
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_save(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Make decrypted copy - Implements index_function_t -.
static int op_exit(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Exit this menu - Implements index_function_t -.
static int op_view_attachments(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Show MIME attachments - Implements index_function_t -.
#define mutt_warning(...)
#define mutt_message(...)
#define mutt_debug(LEVEL,...)
Convenience wrapper for the gui headers.
void mutt_help(const struct MenuDefinition *md)
Display the Help Page.
Read/write command history from/to a file.
bool index_next_undeleted(struct MuttWindow *win_index)
Select the next undeleted Email (if possible)
struct SubMenu * index_get_submenu(void)
Get the Index SubMenu.
GUI manage the main index (list of emails)
void km_menu_add_submenu(struct MenuDefinition *md, struct SubMenu *sm)
Add a SubMenu to a Menu Definition.
struct SubMenu * km_register_submenu(const struct MenuFuncOp functions[])
Register a submenu.
struct MenuDefinition * km_register_menu(int menu, const char *name)
Register a menu.
void km_menu_add_bindings(struct MenuDefinition *md, const struct MenuOpSeq bindings[])
Add Keybindings to a Menu.
@ LL_DEBUG1
Log at debug level 1.
bool mutt_mb_is_lower(const char *s)
Does a multi-byte string contain only lowercase characters?
#define FREE(x)
Free memory and set the pointer to NULL.
#define MIN(a, b)
Return the minimum of two values.
#define MAX(a, b)
Return the maximum of two values.
@ MODULE_ID_PAGER
ModulePager, Pager
Convenience wrapper for the library headers.
bool notify_send(struct Notify *notify, enum NotifyType event_type, int event_subtype, void *event_data)
Send out a notification message.
bool mutt_str_equal(const char *a, const char *b)
Compare two strings.
size_t mutt_str_copy(char *dest, const char *src, size_t dsize)
Copy a string into a buffer (guaranteeing NUL-termination)
Many unsorted constants and some structs.
void expand_path(struct Buffer *buf, bool regex)
Create the canonical path.
Some miscellaneous functions.
void * neomutt_get_module_data(struct NeoMutt *n, enum ModuleId id)
Get the private data for a Module.
@ NT_PAGER
Pager data has changed, NotifyPager, PagerPrivateData.
const char * opcodes_get_name(int op)
Get the name of an opcode.
const struct CompleteOps CompletePatternOps
Auto-Completion of Patterns.
Match patterns to emails.
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.
#define COLOR_QUOTED(cid)
#define REG_COMP(preg, regex, cflags)
Compile a regular expression.
String manipulation buffer.
size_t dsize
Length of data.
char * data
Pointer to data.
bool attach_del
Has an attachment marked for deletion.
Input for the file completion function.
Data shared between Index, Pager and Sidebar.
struct Email * email
Currently selected Email.
struct Mailbox * mailbox
Current Mailbox.
bool attach_msg
Are we in "attach message" mode?
struct MailboxView * mailbox_view
Current Mailbox view.
An event such as a keypress.
int count
Optional count prefix, e.g. 3 for 3j
int op
Function opcode, e.g. OP_HELP.
A line of text in the pager.
short search_arr_size
Number of items in search array.
struct TextSyntax * search
Array of search text in the line.
bool cont_line
Continuation of a previous line (wrapped by NeoMutt)
short cid
Default line colour, e.g. MT_COLOR_SIGNATURE.
LOFF_T offset
Offset into Email file (PagerPrivateData->fp)
bool changed
Mailbox has been modified.
struct WindowState state
Current state of the Window.
void * wdata
Private data.
struct MuttWindow * parent
Parent Window.
Container for Accounts, Notifications.
struct ConfigSubset * sub
Inherited config items.
short rows
Number of rows, can be MUTT_WIN_SIZE_UNLIMITED.
@ MENU_PAGER
Pager pager (email viewer)