67 {
"bottom", OP_PAGER_BOTTOM },
68 {
"bounce-message", OP_BOUNCE_MESSAGE },
69 {
"break-thread", OP_MAIN_BREAK_THREAD },
70 {
"change-folder", OP_MAIN_CHANGE_FOLDER },
71 {
"change-folder-readonly", OP_MAIN_CHANGE_FOLDER_READONLY },
72 {
"change-newsgroup", OP_MAIN_CHANGE_GROUP },
73 {
"change-newsgroup-readonly", OP_MAIN_CHANGE_GROUP_READONLY },
75 {
"change-vfolder", OP_MAIN_CHANGE_VFOLDER },
77 {
"check-stats", OP_CHECK_STATS },
78 {
"check-traditional-pgp", OP_CHECK_TRADITIONAL },
79 {
"clear-flag", OP_MAIN_CLEAR_FLAG },
80 {
"compose-to-sender", OP_COMPOSE_TO_SENDER },
81 {
"copy-message", OP_COPY_MESSAGE },
82 {
"create-alias", OP_CREATE_ALIAS },
83 {
"decode-copy", OP_DECODE_COPY },
84 {
"decode-save", OP_DECODE_SAVE },
85 {
"decrypt-copy", OP_DECRYPT_COPY },
86 {
"decrypt-save", OP_DECRYPT_SAVE },
87 {
"delete-message", OP_DELETE },
88 {
"delete-subthread", OP_DELETE_SUBTHREAD },
89 {
"delete-thread", OP_DELETE_THREAD },
90 {
"display-address", OP_DISPLAY_ADDRESS },
91 {
"display-toggle-weed", OP_DISPLAY_HEADERS },
92 {
"edit", OP_EDIT_RAW_MESSAGE },
93 {
"edit-label", OP_EDIT_LABEL },
94 {
"edit-or-view-raw-message", OP_EDIT_OR_VIEW_RAW_MESSAGE },
95 {
"edit-raw-message", OP_EDIT_RAW_MESSAGE },
96 {
"edit-type", OP_ATTACH_EDIT_TYPE },
97 {
"enter-command", OP_ENTER_COMMAND },
99 {
"entire-thread", OP_MAIN_ENTIRE_THREAD },
102 {
"extract-keys", OP_EXTRACT_KEYS },
103 {
"flag-message", OP_FLAG_MESSAGE },
104 {
"followup-message", OP_FOLLOWUP },
105 {
"forget-passphrase", OP_FORGET_PASSPHRASE },
106 {
"forward-message", OP_FORWARD_MESSAGE },
107 {
"forward-to-group", OP_FORWARD_TO_GROUP },
108 {
"group-chat-reply", OP_GROUP_CHAT_REPLY },
109 {
"group-reply", OP_GROUP_REPLY },
110 {
"half-down", OP_HALF_DOWN },
111 {
"half-up", OP_HALF_UP },
113 {
"imap-fetch-mail", OP_MAIN_IMAP_FETCH },
114 {
"imap-logout-all", OP_MAIN_IMAP_LOGOUT_ALL },
116 {
"link-threads", OP_MAIN_LINK_THREADS },
117 {
"list-action", OP_LIST_ACTION },
118 {
"list-reply", OP_LIST_REPLY },
119 {
"list-subscribe", OP_LIST_SUBSCRIBE },
120 {
"list-unsubscribe", OP_LIST_UNSUBSCRIBE },
122 {
"mail-key", OP_MAIL_KEY },
123 {
"mailbox-list", OP_MAILBOX_LIST },
124 {
"mark-as-new", OP_TOGGLE_NEW },
125 {
"modify-labels", OP_MAIN_MODIFY_TAGS },
126 {
"modify-labels-then-hide", OP_MAIN_MODIFY_TAGS_THEN_HIDE },
127 {
"modify-tags", OP_MAIN_MODIFY_TAGS },
128 {
"modify-tags-then-hide", OP_MAIN_MODIFY_TAGS_THEN_HIDE },
129 {
"next-entry", OP_NEXT_ENTRY },
130 {
"next-line", OP_NEXT_LINE },
131 {
"next-new", OP_MAIN_NEXT_NEW },
132 {
"next-new-then-unread", OP_MAIN_NEXT_NEW_THEN_UNREAD },
133 {
"next-page", OP_NEXT_PAGE },
134 {
"next-subthread", OP_MAIN_NEXT_SUBTHREAD },
135 {
"next-thread", OP_MAIN_NEXT_THREAD },
136 {
"next-undeleted", OP_MAIN_NEXT_UNDELETED },
137 {
"next-unread", OP_MAIN_NEXT_UNREAD },
138 {
"next-unread-mailbox", OP_MAIN_NEXT_UNREAD_MAILBOX },
139 {
"parent-message", OP_MAIN_PARENT_MESSAGE },
140 {
"pipe-entry", OP_PIPE },
141 {
"pipe-message", OP_PIPE },
142 {
"post-message", OP_POST },
143 {
"previous-entry", OP_PREV_ENTRY },
144 {
"previous-line", OP_PREV_LINE },
145 {
"previous-new", OP_MAIN_PREV_NEW },
146 {
"previous-new-then-unread", OP_MAIN_PREV_NEW_THEN_UNREAD },
147 {
"previous-page", OP_PREV_PAGE },
148 {
"previous-subthread", OP_MAIN_PREV_SUBTHREAD },
149 {
"previous-thread", OP_MAIN_PREV_THREAD },
150 {
"previous-undeleted", OP_MAIN_PREV_UNDELETED },
151 {
"previous-unread", OP_MAIN_PREV_UNREAD },
152 {
"previous-unread-mailbox", OP_MAIN_PREV_UNREAD_MAILBOX },
153 {
"print-entry", OP_ATTACH_PRINT },
154 {
"print-message", OP_PRINT },
155 {
"purge-message", OP_PURGE_MESSAGE },
156 {
"purge-thread", OP_PURGE_THREAD },
157 {
"quasi-delete", OP_MAIN_QUASI_DELETE },
159 {
"read-subthread", OP_MAIN_READ_SUBTHREAD },
160 {
"read-thread", OP_MAIN_READ_THREAD },
161 {
"recall-message", OP_RECALL_MESSAGE },
162 {
"reconstruct-thread", OP_RECONSTRUCT_THREAD },
163 {
"redraw-screen", OP_REDRAW },
164 {
"reply", OP_REPLY },
165 {
"resend-message", OP_RESEND },
166 {
"root-message", OP_MAIN_ROOT_MESSAGE },
167 {
"save-entry", OP_ATTACH_SAVE },
168 {
"save-message", OP_SAVE },
169 {
"search", OP_SEARCH },
170 {
"search-next", OP_SEARCH_NEXT },
171 {
"search-opposite", OP_SEARCH_OPPOSITE },
172 {
"search-reverse", OP_SEARCH_REVERSE },
173 {
"search-toggle", OP_SEARCH_TOGGLE },
174 {
"set-flag", OP_MAIN_SET_FLAG },
175 {
"shell-escape", OP_SHELL_ESCAPE },
176 {
"show-log-messages", OP_SHOW_LOG_MESSAGES },
177 {
"show-version", OP_VERSION },
178 {
"skip-headers", OP_PAGER_SKIP_HEADERS },
179 {
"skip-quoted", OP_PAGER_SKIP_QUOTED },
180 {
"sort-mailbox", OP_SORT },
181 {
"sort-reverse", OP_SORT_REVERSE },
182 {
"sync-mailbox", OP_MAIN_SYNC_FOLDER },
183 {
"tag-message", OP_TAG },
184 {
"toggle-quoted", OP_PAGER_HIDE_QUOTED },
185 {
"toggle-write", OP_TOGGLE_WRITE },
186 {
"top", OP_PAGER_TOP },
187 {
"undelete-message", OP_UNDELETE },
188 {
"undelete-subthread", OP_UNDELETE_SUBTHREAD },
189 {
"undelete-thread", OP_UNDELETE_THREAD },
191 {
"vfolder-from-query", OP_MAIN_VFOLDER_FROM_QUERY },
192 {
"vfolder-from-query-readonly", OP_MAIN_VFOLDER_FROM_QUERY_READONLY },
194 {
"view-attachments", OP_VIEW_ATTACHMENTS },
195 {
"view-raw-message", OP_VIEW_RAW_MESSAGE },
196 {
"what-key", OP_WHAT_KEY },
207 { OP_ATTACH_EDIT_TYPE,
"\005" },
208 { OP_BOUNCE_MESSAGE,
"b" },
209 { OP_CHECK_TRADITIONAL,
"\033P" },
210 { OP_COPY_MESSAGE,
"C" },
211 { OP_CREATE_ALIAS,
"a" },
212 { OP_DECODE_COPY,
"\033C" },
213 { OP_DECODE_SAVE,
"\033s" },
215 { OP_DELETE_SUBTHREAD,
"\033d" },
216 { OP_DELETE_THREAD,
"\004" },
217 { OP_DISPLAY_ADDRESS,
"@" },
218 { OP_DISPLAY_HEADERS,
"h" },
219 { OP_EDIT_LABEL,
"Y" },
220 { OP_EDIT_OR_VIEW_RAW_MESSAGE,
"e" },
221 { OP_ENTER_COMMAND,
":" },
224 { OP_EXTRACT_KEYS,
"\013" },
225 { OP_FLAG_MESSAGE,
"F" },
226 { OP_FORGET_PASSPHRASE,
"\006" },
227 { OP_FORWARD_MESSAGE,
"f" },
228 { OP_GROUP_REPLY,
"g" },
230 { OP_LIST_ACTION,
"\033L" },
231 { OP_LIST_REPLY,
"L" },
233 { OP_MAILBOX_LIST,
"." },
234 { OP_MAIL_KEY,
"\033k" },
235 { OP_MAIN_BREAK_THREAD,
"#" },
236 { OP_MAIN_CHANGE_FOLDER,
"c" },
237 { OP_MAIN_CHANGE_FOLDER_READONLY,
"\033c" },
238 { OP_MAIN_CLEAR_FLAG,
"W" },
239 { OP_MAIN_LINK_THREADS,
"&" },
240 { OP_MAIN_NEXT_NEW_THEN_UNREAD,
"\t" },
241 { OP_MAIN_NEXT_SUBTHREAD,
"\033n" },
242 { OP_MAIN_NEXT_THREAD,
"\016" },
243 { OP_MAIN_NEXT_UNDELETED,
"<down>" },
244 { OP_MAIN_NEXT_UNDELETED,
"<right>" },
245 { OP_MAIN_NEXT_UNDELETED,
"j" },
246 { OP_MAIN_PARENT_MESSAGE,
"P" },
247 { OP_MAIN_PREV_SUBTHREAD,
"\033p" },
248 { OP_MAIN_PREV_THREAD,
"\020" },
249 { OP_MAIN_PREV_UNDELETED,
"<left>" },
250 { OP_MAIN_PREV_UNDELETED,
"<up>" },
251 { OP_MAIN_PREV_UNDELETED,
"k" },
252 { OP_MAIN_READ_SUBTHREAD,
"\033r" },
253 { OP_MAIN_READ_THREAD,
"\022" },
254 { OP_MAIN_SET_FLAG,
"w" },
255 { OP_MAIN_SYNC_FOLDER,
"$" },
256 { OP_NEXT_ENTRY,
"J" },
257 { OP_NEXT_LINE,
"<keypadenter>" },
258 { OP_NEXT_LINE,
"\n" },
259 { OP_NEXT_LINE,
"\r" },
260 { OP_NEXT_PAGE,
" " },
261 { OP_NEXT_PAGE,
"<pagedown>" },
262 { OP_PAGER_BOTTOM,
"<end>" },
263 { OP_PAGER_HIDE_QUOTED,
"T" },
264 { OP_PAGER_SKIP_HEADERS,
"H" },
265 { OP_PAGER_SKIP_QUOTED,
"S" },
266 { OP_PAGER_TOP,
"<home>" },
267 { OP_PAGER_TOP,
"^" },
269 { OP_PREV_ENTRY,
"K" },
270 { OP_PREV_LINE,
"<backspace>" },
271 { OP_PREV_PAGE,
"-" },
272 { OP_PREV_PAGE,
"<pageup>" },
275 { OP_RECALL_MESSAGE,
"R" },
276 { OP_REDRAW,
"\014" },
278 { OP_RESEND,
"\033e" },
281 { OP_SEARCH_NEXT,
"n" },
282 { OP_SEARCH_REVERSE,
"\033/" },
283 { OP_SEARCH_TOGGLE,
"\\" },
284 { OP_SHELL_ESCAPE,
"!" },
286 { OP_SORT_REVERSE,
"O" },
288 { OP_TOGGLE_NEW,
"N" },
289 { OP_TOGGLE_WRITE,
"%" },
290 { OP_UNDELETE,
"u" },
291 { OP_UNDELETE_SUBTHREAD,
"\033u" },
292 { OP_UNDELETE_THREAD,
"\025" },
294 { OP_VIEW_ATTACHMENTS,
"v" },
305 struct SubMenu *sm_pager = NULL;
347 while ((cur > 0) && (nlines > 0))
368 while ((cur < max) && (nlines > 0))
371 if ((cur < max) && (!hiding || !
COLOR_QUOTED(info[cur].cid)))
438 if (event->
count > 0)
440 int advance =
event->count * (rows / 2);
450 else if (c_pager_stop)
453 if (event->
count == 0)
477 int n =
MAX(event->
count, 1) * (rows / 2 + rows % 2);
481 else if (event->
count == 0)
523 else if (event->
count == 0)
541 if (event->
count > 0)
554 else if (c_pager_stop)
557 if (event->
count == 0)
583 else if (event->
count == 0)
599 if (event->
count == 0)
631 const int op =
event->op;
632 if (
mw_get_field(((op == OP_SEARCH) || (op == OP_SEARCH_NEXT)) ?
_(
"Search for: ") :
_(
"Reverse search for: "),
642 struct KeyEvent event_s = { 0, OP_NULL };
646 event_s.
op = OP_SEARCH_NEXT;
648 event_s.
op = OP_SEARCH_OPPOSITE;
663 else if (
op == OP_SEARCH_REVERSE)
682 for (
size_t i = 0; i < priv->
lines_max; i++)
710 for (i = priv->
top_line; i >= 0; i--)
726 for (i = priv->
top_line; i < priv->lines_used; i++)
735 if (i < priv->lines_used)
788 const int op =
event->op;
791 if ((!priv->
search_back && (op == OP_SEARCH_NEXT)) ||
812 else if (priv->
wrapped || !c_wrap_search)
844 else if (priv->
wrapped || !c_wrap_search)
889 while (((new_topline < priv->lines_used) ||
924 const short c_pager_skip_quoted_context =
cs_subset_number(fdata->
n->
sub,
"pager_skip_quoted_context");
932 while (((new_topline < priv->lines_used) ||
948 if (c_pager_skip_quoted_context > 0)
950 while (((new_topline < priv->lines_used) ||
966 if (num_quoted <= c_pager_skip_quoted_context)
970 while (((new_topline < priv->lines_used) ||
984 while (((new_topline < priv->lines_used) ||
999 priv->
top_line = new_topline -
MIN(c_pager_skip_quoted_context, num_quoted);
1016 const int count =
MAX(event->
count, 1);
1018 for (
int i = 0; i < count; i++)
1091 FILE *fp_save = NULL;
1095 long pos = ftell(priv->
fp);
1225 if (!dlg || !dlg->
wdata)
1231 const int op =
event->op;
1238 .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.
@ MFF_DEPRECATED
Function is deprecated.
static int op_exit(struct AliasFunctionData *fdata, const struct KeyEvent *event)
exit this menu - 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_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)
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)