31#include "docs/makedoc_defs.h"
69 {
"bottom", OP_PAGER_BOTTOM },
70 {
"bounce-message", OP_BOUNCE_MESSAGE },
71 {
"break-thread", OP_MAIN_BREAK_THREAD },
72 {
"change-folder", OP_MAIN_CHANGE_FOLDER },
73 {
"change-folder-readonly", OP_MAIN_CHANGE_FOLDER_READONLY },
75 {
"change-newsgroup", OP_MAIN_CHANGE_GROUP },
76 {
"change-newsgroup-readonly", OP_MAIN_CHANGE_GROUP_READONLY },
79 {
"change-vfolder", OP_MAIN_CHANGE_VFOLDER },
81 {
"check-stats", OP_CHECK_STATS },
82 {
"check-traditional-pgp", OP_CHECK_TRADITIONAL },
83 {
"clear-flag", OP_MAIN_CLEAR_FLAG },
84 {
"compose-to-sender", OP_COMPOSE_TO_SENDER },
85 {
"copy-message", OP_COPY_MESSAGE },
86 {
"create-alias", OP_CREATE_ALIAS },
87 {
"decode-copy", OP_DECODE_COPY },
88 {
"decode-save", OP_DECODE_SAVE },
89 {
"decrypt-copy", OP_DECRYPT_COPY },
90 {
"decrypt-save", OP_DECRYPT_SAVE },
91 {
"delete-message", OP_DELETE },
92 {
"delete-subthread", OP_DELETE_SUBTHREAD },
93 {
"delete-thread", OP_DELETE_THREAD },
94 {
"display-address", OP_DISPLAY_ADDRESS },
95 {
"display-toggle-weed", OP_DISPLAY_HEADERS },
96 {
"edit", OP_EDIT_RAW_MESSAGE },
97 {
"edit-label", OP_EDIT_LABEL },
98 {
"edit-or-view-raw-message", OP_EDIT_OR_VIEW_RAW_MESSAGE },
99 {
"edit-raw-message", OP_EDIT_RAW_MESSAGE },
100 {
"edit-type", OP_ATTACHMENT_EDIT_TYPE },
101 {
"enter-command", OP_ENTER_COMMAND },
103 {
"entire-thread", OP_MAIN_ENTIRE_THREAD },
106 {
"extract-keys", OP_EXTRACT_KEYS },
107 {
"flag-message", OP_FLAG_MESSAGE },
109 {
"followup-message", OP_FOLLOWUP },
111 {
"forget-passphrase", OP_FORGET_PASSPHRASE },
112 {
"forward-message", OP_FORWARD_MESSAGE },
114 {
"forward-to-group", OP_FORWARD_TO_GROUP },
116 {
"group-chat-reply", OP_GROUP_CHAT_REPLY },
117 {
"group-reply", OP_GROUP_REPLY },
118 {
"half-down", OP_HALF_DOWN },
119 {
"half-up", OP_HALF_UP },
122 {
"imap-fetch-mail", OP_MAIN_IMAP_FETCH },
123 {
"imap-logout-all", OP_MAIN_IMAP_LOGOUT_ALL },
126 {
"jump", OP_JUMP_1 },
127 {
"jump", OP_JUMP_2 },
128 {
"jump", OP_JUMP_3 },
129 {
"jump", OP_JUMP_4 },
130 {
"jump", OP_JUMP_5 },
131 {
"jump", OP_JUMP_6 },
132 {
"jump", OP_JUMP_7 },
133 {
"jump", OP_JUMP_8 },
134 {
"jump", OP_JUMP_9 },
135 {
"link-threads", OP_MAIN_LINK_THREADS },
136 {
"list-reply", OP_LIST_REPLY },
137 {
"list-subscribe", OP_LIST_SUBSCRIBE },
138 {
"list-unsubscribe", OP_LIST_UNSUBSCRIBE },
140 {
"mail-key", OP_MAIL_KEY },
141 {
"mailbox-list", OP_MAILBOX_LIST },
142 {
"mark-as-new", OP_TOGGLE_NEW },
143 {
"modify-labels", OP_MAIN_MODIFY_TAGS },
144 {
"modify-labels-then-hide", OP_MAIN_MODIFY_TAGS_THEN_HIDE },
145 {
"modify-tags", OP_MAIN_MODIFY_TAGS },
146 {
"modify-tags-then-hide", OP_MAIN_MODIFY_TAGS_THEN_HIDE },
147 {
"next-entry", OP_NEXT_ENTRY },
148 {
"next-line", OP_NEXT_LINE },
149 {
"next-new", OP_MAIN_NEXT_NEW },
150 {
"next-new-then-unread", OP_MAIN_NEXT_NEW_THEN_UNREAD },
151 {
"next-page", OP_NEXT_PAGE },
152 {
"next-subthread", OP_MAIN_NEXT_SUBTHREAD },
153 {
"next-thread", OP_MAIN_NEXT_THREAD },
154 {
"next-undeleted", OP_MAIN_NEXT_UNDELETED },
155 {
"next-unread", OP_MAIN_NEXT_UNREAD },
156 {
"next-unread-mailbox", OP_MAIN_NEXT_UNREAD_MAILBOX },
157 {
"parent-message", OP_MAIN_PARENT_MESSAGE },
158 {
"pipe-entry", OP_PIPE },
159 {
"pipe-message", OP_PIPE },
161 {
"post-message", OP_POST },
163 {
"previous-entry", OP_PREV_ENTRY },
164 {
"previous-line", OP_PREV_LINE },
165 {
"previous-new", OP_MAIN_PREV_NEW },
166 {
"previous-new-then-unread", OP_MAIN_PREV_NEW_THEN_UNREAD },
167 {
"previous-page", OP_PREV_PAGE },
168 {
"previous-subthread", OP_MAIN_PREV_SUBTHREAD },
169 {
"previous-thread", OP_MAIN_PREV_THREAD },
170 {
"previous-undeleted", OP_MAIN_PREV_UNDELETED },
171 {
"previous-unread", OP_MAIN_PREV_UNREAD },
172 {
"print-entry", OP_ATTACHMENT_PRINT },
173 {
"print-message", OP_PRINT },
174 {
"purge-message", OP_PURGE_MESSAGE },
175 {
"purge-thread", OP_PURGE_THREAD },
176 {
"quasi-delete", OP_MAIN_QUASI_DELETE },
178 {
"read-subthread", OP_MAIN_READ_SUBTHREAD },
179 {
"read-thread", OP_MAIN_READ_THREAD },
180 {
"recall-message", OP_RECALL_MESSAGE },
182 {
"reconstruct-thread", OP_RECONSTRUCT_THREAD },
184 {
"redraw-screen", OP_REDRAW },
185 {
"reply", OP_REPLY },
186 {
"resend-message", OP_RESEND },
187 {
"root-message", OP_MAIN_ROOT_MESSAGE },
188 {
"save-entry", OP_ATTACHMENT_SAVE },
189 {
"save-message", OP_SAVE },
190 {
"search", OP_SEARCH },
191 {
"search-next", OP_SEARCH_NEXT },
192 {
"search-opposite", OP_SEARCH_OPPOSITE },
193 {
"search-reverse", OP_SEARCH_REVERSE },
194 {
"search-toggle", OP_SEARCH_TOGGLE },
195 {
"set-flag", OP_MAIN_SET_FLAG },
196 {
"shell-escape", OP_SHELL_ESCAPE },
197 {
"show-log-messages", OP_SHOW_LOG_MESSAGES },
198 {
"show-version", OP_VERSION },
200 {
"sidebar-first", OP_SIDEBAR_FIRST },
201 {
"sidebar-last", OP_SIDEBAR_LAST },
202 {
"sidebar-next", OP_SIDEBAR_NEXT },
203 {
"sidebar-next-new", OP_SIDEBAR_NEXT_NEW },
204 {
"sidebar-open", OP_SIDEBAR_OPEN },
205 {
"sidebar-page-down", OP_SIDEBAR_PAGE_DOWN },
206 {
"sidebar-page-up", OP_SIDEBAR_PAGE_UP },
207 {
"sidebar-prev", OP_SIDEBAR_PREV },
208 {
"sidebar-prev-new", OP_SIDEBAR_PREV_NEW },
209 {
"sidebar-toggle-virtual", OP_SIDEBAR_TOGGLE_VIRTUAL },
210 {
"sidebar-toggle-visible", OP_SIDEBAR_TOGGLE_VISIBLE },
212 {
"skip-headers", OP_PAGER_SKIP_HEADERS },
213 {
"skip-quoted", OP_PAGER_SKIP_QUOTED },
214 {
"sort-mailbox", OP_SORT },
215 {
"sort-reverse", OP_SORT_REVERSE },
216 {
"sync-mailbox", OP_MAIN_SYNC_FOLDER },
217 {
"tag-message", OP_TAG },
218 {
"toggle-quoted", OP_PAGER_HIDE_QUOTED },
219 {
"toggle-write", OP_TOGGLE_WRITE },
220 {
"top", OP_PAGER_TOP },
221 {
"undelete-message", OP_UNDELETE },
222 {
"undelete-subthread", OP_UNDELETE_SUBTHREAD },
223 {
"undelete-thread", OP_UNDELETE_THREAD },
225 {
"vfolder-from-query", OP_MAIN_VFOLDER_FROM_QUERY },
226 {
"vfolder-from-query-readonly", OP_MAIN_VFOLDER_FROM_QUERY_READONLY },
228 {
"view-attachments", OP_VIEW_ATTACHMENTS },
229 {
"view-raw-message", OP_VIEW_RAW_MESSAGE },
230 {
"what-key", OP_WHAT_KEY },
232 {
"buffy-list", OP_MAILBOX_LIST },
233 {
"error-history", OP_SHOW_LOG_MESSAGES },
241 { OP_ATTACHMENT_EDIT_TYPE,
"\005" },
242 { OP_BOUNCE_MESSAGE,
"b" },
243 { OP_CHECK_TRADITIONAL,
"\033P" },
244 { OP_COPY_MESSAGE,
"C" },
245 { OP_CREATE_ALIAS,
"a" },
246 { OP_DECODE_COPY,
"\033C" },
247 { OP_DECODE_SAVE,
"\033s" },
249 { OP_DELETE_SUBTHREAD,
"\033d" },
250 { OP_DELETE_THREAD,
"\004" },
251 { OP_DISPLAY_ADDRESS,
"@" },
252 { OP_DISPLAY_HEADERS,
"h" },
253 { OP_EDIT_LABEL,
"Y" },
254 { OP_EDIT_OR_VIEW_RAW_MESSAGE,
"e" },
255 { OP_ENTER_COMMAND,
":" },
259 { OP_EXTRACT_KEYS,
"\013" },
260 { OP_FLAG_MESSAGE,
"F" },
261 { OP_FORGET_PASSPHRASE,
"\006" },
262 { OP_FORWARD_MESSAGE,
"f" },
263 { OP_GROUP_REPLY,
"g" },
274 { OP_LIST_REPLY,
"L" },
276 { OP_MAILBOX_LIST,
"." },
277 { OP_MAIL_KEY,
"\033k" },
278 { OP_MAIN_BREAK_THREAD,
"#" },
279 { OP_MAIN_CHANGE_FOLDER,
"c" },
280 { OP_MAIN_CHANGE_FOLDER_READONLY,
"\033c" },
281 { OP_MAIN_CLEAR_FLAG,
"W" },
282 { OP_MAIN_LINK_THREADS,
"&" },
283 { OP_MAIN_NEXT_NEW_THEN_UNREAD,
"\t" },
284 { OP_MAIN_NEXT_SUBTHREAD,
"\033n" },
285 { OP_MAIN_NEXT_THREAD,
"\016" },
286 { OP_MAIN_NEXT_UNDELETED,
"<down>" },
287 { OP_MAIN_NEXT_UNDELETED,
"<right>" },
288 { OP_MAIN_NEXT_UNDELETED,
"j" },
289 { OP_MAIN_PARENT_MESSAGE,
"P" },
290 { OP_MAIN_PREV_SUBTHREAD,
"\033p" },
291 { OP_MAIN_PREV_THREAD,
"\020" },
292 { OP_MAIN_PREV_UNDELETED,
"<left>" },
293 { OP_MAIN_PREV_UNDELETED,
"<up>" },
294 { OP_MAIN_PREV_UNDELETED,
"k" },
295 { OP_MAIN_READ_SUBTHREAD,
"\033r" },
296 { OP_MAIN_READ_THREAD,
"\022" },
297 { OP_MAIN_SET_FLAG,
"w" },
298 { OP_MAIN_SYNC_FOLDER,
"$" },
299 { OP_NEXT_ENTRY,
"J" },
300 { OP_NEXT_LINE,
"<keypadenter>" },
301 { OP_NEXT_LINE,
"\n" },
302 { OP_NEXT_LINE,
"\r" },
303 { OP_NEXT_PAGE,
" " },
304 { OP_NEXT_PAGE,
"<pagedown>" },
305 { OP_PAGER_BOTTOM,
"<end>" },
306 { OP_PAGER_HIDE_QUOTED,
"T" },
307 { OP_PAGER_SKIP_HEADERS,
"H" },
308 { OP_PAGER_SKIP_QUOTED,
"S" },
309 { OP_PAGER_TOP,
"<home>" },
310 { OP_PAGER_TOP,
"^" },
312 { OP_PREV_ENTRY,
"K" },
313 { OP_PREV_LINE,
"<backspace>" },
314 { OP_PREV_PAGE,
"-" },
315 { OP_PREV_PAGE,
"<pageup>" },
318 { OP_RECALL_MESSAGE,
"R" },
319 { OP_REDRAW,
"\014" },
321 { OP_RESEND,
"\033e" },
324 { OP_SEARCH_NEXT,
"n" },
325 { OP_SEARCH_REVERSE,
"\033/" },
326 { OP_SEARCH_TOGGLE,
"\\" },
327 { OP_SHELL_ESCAPE,
"!" },
329 { OP_SORT_REVERSE,
"O" },
331 { OP_TOGGLE_NEW,
"N" },
332 { OP_TOGGLE_WRITE,
"%" },
333 { OP_UNDELETE,
"u" },
334 { OP_UNDELETE_SUBTHREAD,
"\033u" },
335 { OP_UNDELETE_THREAD,
"\025" },
337 { OP_VIEW_ATTACHMENTS,
"v" },
370 while ((cur > 0) && (nlines > 0))
437 else if (c_pager_stop)
531 else if (c_pager_stop)
598 if (
mw_get_field(((op == OP_SEARCH) || (op == OP_SEARCH_NEXT)) ?
_(
"Search for: ") :
_(
"Reverse search for: "),
612 op = OP_SEARCH_OPPOSITE;
627 else if (op == OP_SEARCH_REVERSE)
646 for (
size_t i = 0; i < priv->
lines_max; i++)
674 for (i = priv->
top_line; i >= 0; i--)
690 for (i = priv->
top_line; i < priv->lines_used; i++)
699 if (i < priv->lines_used)
745 if (c_search_context < priv->pview->win_pager->state.rows)
751 if ((!priv->
search_back && (op == OP_SEARCH_NEXT)) ||
757 i < priv->lines_used; i++)
767 if (i < priv->lines_used)
771 else if (priv->
wrapped || !c_wrap_search)
801 else if (priv->
wrapped || !c_wrap_search)
843 while (((new_topline < priv->lines_used) ||
887 while (((new_topline < priv->lines_used) ||
903 if (c_pager_skip_quoted_context > 0)
905 while (((new_topline < priv->lines_used) ||
919 mutt_error(
_(
"No more unquoted text after quoted text"));
924 if (num_quoted <= c_pager_skip_quoted_context)
928 while (((new_topline < priv->lines_used) ||
945 while (((new_topline < priv->lines_used) ||
959 mutt_error(
_(
"No more unquoted text after quoted text"));
963 priv->
top_line = new_topline -
MIN(c_pager_skip_quoted_context, num_quoted);
1090 if (!dlg || !dlg->
wdata)
1100 rc = fn->
function(shared, priv, op);
static const char * Not_available_in_this_menu
Error message for unavailable functions.
GUI display the mailboxes in a side panel.
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.
bool simple_color_is_header(enum ColorId cid)
Colour is for an Email header.
@ MT_COLOR_QUOTED
Pager: quoted text.
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.
void mutt_flushinp(void)
Empty all the keyboard buffers.
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.
@ 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.
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.
Structs that make up an email.
static int op_exit(struct AliasMenuData *mdata, int op)
exit this menu - Implements alias_function_t -
int pager_function_dispatcher(struct MuttWindow *win, int op)
Perform a Pager function - Implements function_dispatcher_t -.
static int op_help(struct EnterWindowData *wdata, int op)
Display Help - Implements enter_function_t -.
void dlg_attachment(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_view_attachments(struct IndexSharedData *shared, struct IndexPrivateData *priv, int op)
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(enum MenuType menu)
Display the help menu.
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)
@ 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.
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.
#define MUTT_COMP_CLEAR
Clear input if printable character is pressed.
@ 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.
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.
bool attach_del
Has an attachment marked for deletion.
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.
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_QUOTED.
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)