NeoMutt  2025-12-11-769-g906513
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
functions.c File Reference

Pager functions. More...

#include "config.h"
#include <inttypes.h>
#include <stdbool.h>
#include <stdio.h>
#include <sys/stat.h>
#include "mutt/lib.h"
#include "config/lib.h"
#include "email/lib.h"
#include "core/lib.h"
#include "gui/lib.h"
#include "mutt.h"
#include "functions.h"
#include "lib.h"
#include "attach/lib.h"
#include "browser/lib.h"
#include "color/lib.h"
#include "editor/lib.h"
#include "history/lib.h"
#include "index/lib.h"
#include "key/lib.h"
#include "menu/lib.h"
#include "pattern/lib.h"
#include "sidebar/lib.h"
#include "display.h"
#include "module_data.h"
#include "muttlib.h"
#include "private_data.h"
+ Include dependency graph for functions.c:

Go to the source code of this file.

Functions

static int op_pager_search_next (struct PagerFunctionData *fdata, const struct KeyEvent *event)
 Search for next match - Implements pager_function_t -.
 
void pager_init_keys (struct NeoMutt *n, struct SubMenu *sm_generic)
 Initialise the Pager Keybindings - Implements ::init_keys_api.
 
static bool assert_pager_mode (bool test)
 Check that pager is in correct mode.
 
static int up_n_lines (int nlines, struct Line *info, int cur, bool hiding)
 Reposition the pager's view up by n lines.
 
bool jump_to_bottom (struct PagerPrivateData *priv, struct PagerView *pview)
 Make sure the bottom line is displayed.
 
static int op_pager_bottom (struct PagerFunctionData *fdata, const struct KeyEvent *event)
 Jump to the bottom of the message - Implements pager_function_t -.
 
static int op_pager_half_down (struct PagerFunctionData *fdata, const struct KeyEvent *event)
 Scroll down 1/2 page - Implements pager_function_t -.
 
static int op_pager_half_up (struct PagerFunctionData *fdata, const struct KeyEvent *event)
 Scroll up 1/2 page - Implements pager_function_t -.
 
static int op_pager_hide_quoted (struct PagerFunctionData *fdata, const struct KeyEvent *event)
 Toggle display of quoted text - Implements pager_function_t -.
 
static int op_pager_next_line (struct PagerFunctionData *fdata, const struct KeyEvent *event)
 Scroll down one line - Implements pager_function_t -.
 
static int op_pager_next_page (struct PagerFunctionData *fdata, const struct KeyEvent *event)
 Move to the next page - Implements pager_function_t -.
 
static int op_pager_prev_line (struct PagerFunctionData *fdata, const struct KeyEvent *event)
 Scroll up one line - Implements pager_function_t -.
 
static int op_pager_prev_page (struct PagerFunctionData *fdata, const struct KeyEvent *event)
 Move to the previous page - Implements pager_function_t -.
 
static int op_pager_search (struct PagerFunctionData *fdata, const struct KeyEvent *event)
 Search for a regular expression - Implements pager_function_t -.
 
static int op_pager_skip_headers (struct PagerFunctionData *fdata, const struct KeyEvent *event)
 Jump to first line after headers - Implements pager_function_t -.
 
static int op_pager_skip_quoted (struct PagerFunctionData *fdata, const struct KeyEvent *event)
 Skip beyond quoted text - Implements pager_function_t -.
 
static int op_pager_top (struct PagerFunctionData *fdata, const struct KeyEvent *event)
 Jump to the top of the message - Implements pager_function_t -.
 
static int op_exit (struct PagerFunctionData *fdata, const struct KeyEvent *event)
 Exit this menu - Implements pager_function_t -.
 
static int op_help (struct PagerFunctionData *fdata, const struct KeyEvent *event)
 Help screen - Implements pager_function_t -.
 
static int op_save (struct PagerFunctionData *fdata, const struct KeyEvent *event)
 Save the Pager text - Implements pager_function_t -.
 
static int op_search_toggle (struct PagerFunctionData *fdata, const struct KeyEvent *event)
 Toggle search pattern coloring - Implements pager_function_t -.
 
static int op_view_attachments (struct PagerFunctionData *fdata, const struct KeyEvent *event)
 Show MIME attachments - Implements pager_function_t -.
 
int pager_function_dispatcher (struct MuttWindow *win, const struct KeyEvent *event)
 Perform a Pager function - Implements function_dispatcher_t -.
 
struct MenuDefinitionpager_get_menu_definition (void)
 Get the Pager Menu Definition.
 

Variables

static const char * Not_available_in_this_menu = N_("Not available in this menu")
 Error message for unavailable functions.
 
static const struct MenuFuncOp OpPager []
 Functions for the Pager Menu.
 
static const struct MenuOpSeq PagerDefaultBindings []
 Key bindings for the Pager Menu.
 
static const struct PagerFunction PagerFunctions []
 All the NeoMutt functions that the Pager supports.
 

Detailed Description

Pager functions.

Authors
  • Richard Russon

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Definition in file functions.c.

Function Documentation

◆ pager_init_keys()

void pager_init_keys ( struct NeoMutt * n,
struct SubMenu * sm_generic )

Initialise the Pager Keybindings - Implements ::init_keys_api.

Definition at line 317 of file functions.c.

318{
319 struct MenuDefinition *md = NULL;
320 struct SubMenu *sm_pager = NULL;
321 struct SubMenu *sm_sidebar = sidebar_get_submenu();
322
323 sm_pager = km_register_submenu(OpPager);
324 md = km_register_menu(MENU_PAGER, "pager");
325 km_menu_add_submenu(md, sm_pager);
326 km_menu_add_submenu(md, sm_sidebar);
328
330 ASSERT(mod_data);
331 mod_data->menu_pager = md;
332}
void km_menu_add_submenu(struct MenuDefinition *md, struct SubMenu *sm)
Add a SubMenu to a Menu Definition.
Definition init.c:121
struct SubMenu * km_register_submenu(const struct MenuFuncOp functions[])
Register a submenu.
Definition init.c:87
struct MenuDefinition * km_register_menu(int menu, const char *name)
Register a menu.
Definition init.c:104
void km_menu_add_bindings(struct MenuDefinition *md, const struct MenuOpSeq bindings[])
Add Keybindings to a Menu.
Definition init.c:134
@ MODULE_ID_PAGER
ModulePager, Pager
Definition module_api.h:83
void * neomutt_get_module_data(struct NeoMutt *n, enum ModuleId id)
Get the private data for a Module.
Definition neomutt.c:665
static const struct MenuOpSeq PagerDefaultBindings[]
Key bindings for the Pager Menu.
Definition functions.c:213
static const struct MenuFuncOp OpPager[]
Functions for the Pager Menu.
Definition functions.c:66
struct SubMenu * sidebar_get_submenu(void)
Get the Sidebar SubMenu.
Definition functions.c:106
#define ASSERT(COND)
Definition signal2.h:59
Functions for a Dialog or Window.
Definition menu.h:80
Pager private Module data.
Definition module_data.h:30
struct MenuDefinition * menu_pager
Pager menu definition.
Definition module_data.h:32
Collection of related functions.
Definition menu.h:68
@ MENU_PAGER
Pager pager (email viewer)
Definition type.h:45
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ assert_pager_mode()

static bool assert_pager_mode ( bool test)
inlinestatic

Check that pager is in correct mode.

Parameters
testTest condition
Return values
trueExpected mode is set
falsePager is is some other mode
Note
On failure, the input will be flushed and an error message displayed

Definition at line 342 of file functions.c.

343{
344 if (test)
345 return true;
346
349 return false;
350}
void mutt_flushinp(void)
MacroEvents moved to KeyModuleData UngetKeyEvents moved to KeyModuleData.
Definition get.c:60
#define mutt_error(...)
Definition logging2.h:94
#define _(a)
Definition message.h:28
static const char * Not_available_in_this_menu
Error message for unavailable functions.
Definition functions.c:58
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ up_n_lines()

static int up_n_lines ( int nlines,
struct Line * info,
int cur,
bool hiding )
static

Reposition the pager's view up by n lines.

Parameters
nlinesNumber of lines to move
infoLine info array
curCurrent line number
hidingtrue if lines have been hidden
Return values
numNew current line number

Definition at line 360 of file functions.c.

361{
362 while ((cur > 0) && (nlines > 0))
363 {
364 cur--;
365 if (!hiding || !COLOR_QUOTED(info[cur].cid))
366 nlines--;
367 }
368
369 return cur;
370}
#define COLOR_QUOTED(cid)
Definition quoted.h:28
+ Here is the caller graph for this function:

◆ jump_to_bottom()

bool jump_to_bottom ( struct PagerPrivateData * priv,
struct PagerView * pview )

Make sure the bottom line is displayed.

Parameters
privPrivate Pager data
pviewPagerView
Return values
trueSomething changed
falseBottom was already displayed

Definition at line 379 of file functions.c.

380{
381 if (!(priv->lines[priv->cur_line].offset < (priv->st.st_size - 1)))
382 {
383 return false;
384 }
385
386 int line_num = priv->cur_line;
387 /* make sure the types are defined to the end of file */
388 while (display_line(priv->fp, &priv->bytes_read, &priv->lines, line_num,
389 &priv->lines_used, &priv->lines_max,
390 priv->has_types | (pview->flags & MUTT_PAGER_NOWRAP),
391 &priv->quote_list, &priv->q_level, &priv->force_redraw,
392 &priv->search_re, priv->pview->win_pager, &priv->ansi_list) == 0)
393 {
394 line_num++;
395 }
396 priv->top_line = up_n_lines(priv->pview->win_pager->state.rows, priv->lines,
397 priv->lines_used, priv->hide_quoted);
399 return true;
400}
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.
Definition display.c:1058
bool notify_send(struct Notify *notify, enum NotifyType event_type, int event_subtype, void *event_data)
Send out a notification message.
Definition notify.c:173
@ NT_PAGER
Pager data has changed, NotifyPager, PagerPrivateData.
Definition notify_type.h:53
static int up_n_lines(int nlines, struct Line *info, int cur, bool hiding)
Reposition the pager's view up by n lines.
Definition functions.c:360
#define NT_PAGER_VIEW
Pager View has changed.
Definition lib.h:188
#define MUTT_PAGER_NOWRAP
Format for term width, ignore $wrap.
Definition lib.h:74
LOFF_T offset
Offset into Email file (PagerPrivateData->fp)
Definition display.h:51
struct WindowState state
Current state of the Window.
PagerFlags hide_quoted
Set to MUTT_HIDE when quoted email is hidden <toggle-quoted>
int q_level
Number of unique quoting levels.
int cur_line
Current line (last line visible on screen)
int lines_used
Size of lines array (used entries)
int lines_max
Capacity of lines array (total entries)
bool force_redraw
Repaint is needed.
struct Line * lines
Array of text lines in pager.
int has_types
Set to MUTT_TYPES for PAGER_MODE_EMAIL or MUTT_SHOWCOLOR.
struct Notify * notify
Notifications: NotifyPager, PagerPrivateData.
LOFF_T bytes_read
Number of bytes read from file.
int top_line
First visible line on screen.
struct stat st
Stats about Email file.
struct QuoteStyle * quote_list
Tree of quoting levels.
struct PagerView * pview
Object to view in the pager.
struct AttrColorList ansi_list
List of ANSI colours used in the Pager.
regex_t search_re
Compiled search string.
FILE * fp
File containing decrypted/decoded/weeded Email.
PagerFlags flags
Additional settings to tweak pager's function.
Definition lib.h:176
struct MuttWindow * win_pager
Pager Window.
Definition lib.h:181
short rows
Number of rows, can be MUTT_WIN_SIZE_UNLIMITED.
Definition mutt_window.h:61
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pager_get_menu_definition()

struct MenuDefinition * pager_get_menu_definition ( void )

Get the Pager Menu Definition.

Return values
ptrPager Menu Definition

Definition at line 1195 of file functions.c.

1196{
1198 ASSERT(mod_data);
1199
1200 return mod_data->menu_pager;
1201}
Container for Accounts, Notifications.
Definition neomutt.h:41
+ Here is the call graph for this function:

Variable Documentation

◆ Not_available_in_this_menu

const char* Not_available_in_this_menu = N_("Not available in this menu")
static

Error message for unavailable functions.

Definition at line 58 of file functions.c.

◆ OpPager

const struct MenuFuncOp OpPager[]
static

Functions for the Pager Menu.

Definition at line 66 of file functions.c.

66 { /* map: pager */
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 },
74#ifdef USE_NOTMUCH
75 { "change-vfolder", OP_MAIN_CHANGE_VFOLDER },
76#endif
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 },
98#ifdef USE_NOTMUCH
99 { "entire-thread", OP_MAIN_ENTIRE_THREAD },
100#endif
101 { "exit", OP_EXIT },
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 },
112 { "help", OP_HELP },
113 { "imap-fetch-mail", OP_MAIN_IMAP_FETCH },
114 { "imap-logout-all", OP_MAIN_IMAP_LOGOUT_ALL },
115 { "jump", OP_JUMP },
116 { "jump", OP_JUMP_1 },
117 { "jump", OP_JUMP_2 },
118 { "jump", OP_JUMP_3 },
119 { "jump", OP_JUMP_4 },
120 { "jump", OP_JUMP_5 },
121 { "jump", OP_JUMP_6 },
122 { "jump", OP_JUMP_7 },
123 { "jump", OP_JUMP_8 },
124 { "jump", OP_JUMP_9 },
125 { "link-threads", OP_MAIN_LINK_THREADS },
126 { "list-reply", OP_LIST_REPLY },
127 { "list-subscribe", OP_LIST_SUBSCRIBE },
128 { "list-unsubscribe", OP_LIST_UNSUBSCRIBE },
129 { "mail", OP_MAIL },
130 { "mail-key", OP_MAIL_KEY },
131 { "mailbox-list", OP_MAILBOX_LIST },
132 { "mark-as-new", OP_TOGGLE_NEW },
133 { "modify-labels", OP_MAIN_MODIFY_TAGS },
134 { "modify-labels-then-hide", OP_MAIN_MODIFY_TAGS_THEN_HIDE },
135 { "modify-tags", OP_MAIN_MODIFY_TAGS },
136 { "modify-tags-then-hide", OP_MAIN_MODIFY_TAGS_THEN_HIDE },
137 { "next-entry", OP_NEXT_ENTRY },
138 { "next-line", OP_NEXT_LINE },
139 { "next-new", OP_MAIN_NEXT_NEW },
140 { "next-new-then-unread", OP_MAIN_NEXT_NEW_THEN_UNREAD },
141 { "next-page", OP_NEXT_PAGE },
142 { "next-subthread", OP_MAIN_NEXT_SUBTHREAD },
143 { "next-thread", OP_MAIN_NEXT_THREAD },
144 { "next-undeleted", OP_MAIN_NEXT_UNDELETED },
145 { "next-unread", OP_MAIN_NEXT_UNREAD },
146 { "next-unread-mailbox", OP_MAIN_NEXT_UNREAD_MAILBOX },
147 { "parent-message", OP_MAIN_PARENT_MESSAGE },
148 { "pipe-entry", OP_PIPE },
149 { "pipe-message", OP_PIPE },
150 { "post-message", OP_POST },
151 { "previous-entry", OP_PREV_ENTRY },
152 { "previous-line", OP_PREV_LINE },
153 { "previous-new", OP_MAIN_PREV_NEW },
154 { "previous-new-then-unread", OP_MAIN_PREV_NEW_THEN_UNREAD },
155 { "previous-page", OP_PREV_PAGE },
156 { "previous-subthread", OP_MAIN_PREV_SUBTHREAD },
157 { "previous-thread", OP_MAIN_PREV_THREAD },
158 { "previous-undeleted", OP_MAIN_PREV_UNDELETED },
159 { "previous-unread", OP_MAIN_PREV_UNREAD },
160 { "print-entry", OP_ATTACH_PRINT },
161 { "print-message", OP_PRINT },
162 { "purge-message", OP_PURGE_MESSAGE },
163 { "purge-thread", OP_PURGE_THREAD },
164 { "quasi-delete", OP_MAIN_QUASI_DELETE },
165 { "quit", OP_QUIT },
166 { "read-subthread", OP_MAIN_READ_SUBTHREAD },
167 { "read-thread", OP_MAIN_READ_THREAD },
168 { "recall-message", OP_RECALL_MESSAGE },
169 { "reconstruct-thread", OP_RECONSTRUCT_THREAD },
170 { "redraw-screen", OP_REDRAW },
171 { "reply", OP_REPLY },
172 { "resend-message", OP_RESEND },
173 { "root-message", OP_MAIN_ROOT_MESSAGE },
174 { "save-entry", OP_ATTACH_SAVE },
175 { "save-message", OP_SAVE },
176 { "search", OP_SEARCH },
177 { "search-next", OP_SEARCH_NEXT },
178 { "search-opposite", OP_SEARCH_OPPOSITE },
179 { "search-reverse", OP_SEARCH_REVERSE },
180 { "search-toggle", OP_SEARCH_TOGGLE },
181 { "set-flag", OP_MAIN_SET_FLAG },
182 { "shell-escape", OP_SHELL_ESCAPE },
183 { "show-log-messages", OP_SHOW_LOG_MESSAGES },
184 { "show-version", OP_VERSION },
185 { "skip-headers", OP_PAGER_SKIP_HEADERS },
186 { "skip-quoted", OP_PAGER_SKIP_QUOTED },
187 { "sort-mailbox", OP_SORT },
188 { "sort-reverse", OP_SORT_REVERSE },
189 { "sync-mailbox", OP_MAIN_SYNC_FOLDER },
190 { "tag-message", OP_TAG },
191 { "toggle-quoted", OP_PAGER_HIDE_QUOTED },
192 { "toggle-write", OP_TOGGLE_WRITE },
193 { "top", OP_PAGER_TOP },
194 { "undelete-message", OP_UNDELETE },
195 { "undelete-subthread", OP_UNDELETE_SUBTHREAD },
196 { "undelete-thread", OP_UNDELETE_THREAD },
197#ifdef USE_NOTMUCH
198 { "vfolder-from-query", OP_MAIN_VFOLDER_FROM_QUERY },
199 { "vfolder-from-query-readonly", OP_MAIN_VFOLDER_FROM_QUERY_READONLY },
200#endif
201 { "view-attachments", OP_VIEW_ATTACHMENTS },
202 { "view-raw-message", OP_VIEW_RAW_MESSAGE },
203 { "what-key", OP_WHAT_KEY },
204 // Deprecated
205 { "buffy-list", OP_MAILBOX_LIST, MFF_DEPRECATED },
206 { "error-history", OP_SHOW_LOG_MESSAGES, MFF_DEPRECATED },
207 { NULL, 0 },
208};
#define MFF_DEPRECATED
Redraw the pager.
Definition get.h:44

◆ PagerDefaultBindings

const struct MenuOpSeq PagerDefaultBindings[]
static

Key bindings for the Pager Menu.

Definition at line 213 of file functions.c.

213 { /* map: pager */
214 { OP_ATTACH_EDIT_TYPE, "\005" }, // <Ctrl-E>
215 { OP_BOUNCE_MESSAGE, "b" },
216 { OP_CHECK_TRADITIONAL, "\033P" }, // <Alt-P>
217 { OP_COPY_MESSAGE, "C" },
218 { OP_CREATE_ALIAS, "a" },
219 { OP_DECODE_COPY, "\033C" }, // <Alt-C>
220 { OP_DECODE_SAVE, "\033s" }, // <Alt-s>
221 { OP_DELETE, "d" },
222 { OP_DELETE_SUBTHREAD, "\033d" }, // <Alt-d>
223 { OP_DELETE_THREAD, "\004" }, // <Ctrl-D>
224 { OP_DISPLAY_ADDRESS, "@" },
225 { OP_DISPLAY_HEADERS, "h" },
226 { OP_EDIT_LABEL, "Y" },
227 { OP_EDIT_OR_VIEW_RAW_MESSAGE, "e" },
228 { OP_ENTER_COMMAND, ":" },
229 { OP_EXIT, "q" },
230 { OP_EXIT, "x" },
231 { OP_EXTRACT_KEYS, "\013" }, // <Ctrl-K>
232 { OP_FLAG_MESSAGE, "F" },
233 { OP_FORGET_PASSPHRASE, "\006" }, // <Ctrl-F>
234 { OP_FORWARD_MESSAGE, "f" },
235 { OP_GROUP_REPLY, "g" },
236 { OP_HELP, "?" },
237 { OP_JUMP_1, "1" },
238 { OP_JUMP_2, "2" },
239 { OP_JUMP_3, "3" },
240 { OP_JUMP_4, "4" },
241 { OP_JUMP_5, "5" },
242 { OP_JUMP_6, "6" },
243 { OP_JUMP_7, "7" },
244 { OP_JUMP_8, "8" },
245 { OP_JUMP_9, "9" },
246 { OP_LIST_REPLY, "L" },
247 { OP_MAIL, "m" },
248 { OP_MAILBOX_LIST, "." },
249 { OP_MAIL_KEY, "\033k" }, // <Alt-k>
250 { OP_MAIN_BREAK_THREAD, "#" },
251 { OP_MAIN_CHANGE_FOLDER, "c" },
252 { OP_MAIN_CHANGE_FOLDER_READONLY, "\033c" }, // <Alt-c>
253 { OP_MAIN_CLEAR_FLAG, "W" },
254 { OP_MAIN_LINK_THREADS, "&" },
255 { OP_MAIN_NEXT_NEW_THEN_UNREAD, "\t" }, // <Tab>
256 { OP_MAIN_NEXT_SUBTHREAD, "\033n" }, // <Alt-n>
257 { OP_MAIN_NEXT_THREAD, "\016" }, // <Ctrl-N>
258 { OP_MAIN_NEXT_UNDELETED, "<down>" },
259 { OP_MAIN_NEXT_UNDELETED, "<right>" },
260 { OP_MAIN_NEXT_UNDELETED, "j" },
261 { OP_MAIN_PARENT_MESSAGE, "P" },
262 { OP_MAIN_PREV_SUBTHREAD, "\033p" }, // <Alt-p>
263 { OP_MAIN_PREV_THREAD, "\020" }, // <Ctrl-P>
264 { OP_MAIN_PREV_UNDELETED, "<left>" },
265 { OP_MAIN_PREV_UNDELETED, "<up>" },
266 { OP_MAIN_PREV_UNDELETED, "k" },
267 { OP_MAIN_READ_SUBTHREAD, "\033r" }, // <Alt-r>
268 { OP_MAIN_READ_THREAD, "\022" }, // <Ctrl-R>
269 { OP_MAIN_SET_FLAG, "w" },
270 { OP_MAIN_SYNC_FOLDER, "$" },
271 { OP_NEXT_ENTRY, "J" },
272 { OP_NEXT_LINE, "<keypadenter>" },
273 { OP_NEXT_LINE, "\n" }, // <Enter>
274 { OP_NEXT_LINE, "\r" }, // <Return>
275 { OP_NEXT_PAGE, " " }, // <Space>
276 { OP_NEXT_PAGE, "<pagedown>" },
277 { OP_PAGER_BOTTOM, "<end>" },
278 { OP_PAGER_HIDE_QUOTED, "T" },
279 { OP_PAGER_SKIP_HEADERS, "H" },
280 { OP_PAGER_SKIP_QUOTED, "S" },
281 { OP_PAGER_TOP, "<home>" },
282 { OP_PAGER_TOP, "^" },
283 { OP_PIPE, "|" },
284 { OP_PREV_ENTRY, "K" },
285 { OP_PREV_LINE, "<backspace>" },
286 { OP_PREV_PAGE, "-" },
287 { OP_PREV_PAGE, "<pageup>" },
288 { OP_PRINT, "p" },
289 { OP_QUIT, "Q" },
290 { OP_RECALL_MESSAGE, "R" },
291 { OP_REDRAW, "\014" }, // <Ctrl-L>
292 { OP_REPLY, "r" },
293 { OP_RESEND, "\033e" }, // <Alt-e>
294 { OP_SAVE, "s" },
295 { OP_SEARCH, "/" },
296 { OP_SEARCH_NEXT, "n" },
297 { OP_SEARCH_REVERSE, "\033/" }, // <Alt-/>
298 { OP_SEARCH_TOGGLE, "\\" }, // <Backslash>
299 { OP_SHELL_ESCAPE, "!" },
300 { OP_SORT, "o" },
301 { OP_SORT_REVERSE, "O" },
302 { OP_TAG, "t" },
303 { OP_TOGGLE_NEW, "N" },
304 { OP_TOGGLE_WRITE, "%" },
305 { OP_UNDELETE, "u" },
306 { OP_UNDELETE_SUBTHREAD, "\033u" }, // <Alt-u>
307 { OP_UNDELETE_THREAD, "\025" }, // <Ctrl-U>
308 { OP_VERSION, "V" },
309 { OP_VIEW_ATTACHMENTS, "v" },
310 { 0, NULL },
311};

◆ PagerFunctions

const struct PagerFunction PagerFunctions[]
static
Initial value:
= {
{ OP_EXIT, op_exit },
{ OP_HALF_DOWN, op_pager_half_down },
{ OP_HALF_UP, op_pager_half_up },
{ OP_HELP, op_help },
{ OP_NEXT_LINE, op_pager_next_line },
{ OP_NEXT_PAGE, op_pager_next_page },
{ OP_PAGER_BOTTOM, op_pager_bottom },
{ OP_PAGER_HIDE_QUOTED, op_pager_hide_quoted },
{ OP_PAGER_SKIP_HEADERS, op_pager_skip_headers },
{ OP_PAGER_SKIP_QUOTED, op_pager_skip_quoted },
{ OP_PAGER_TOP, op_pager_top },
{ OP_PREV_LINE, op_pager_prev_line },
{ OP_PREV_PAGE, op_pager_prev_page },
{ OP_SAVE, op_save },
{ OP_SEARCH, op_pager_search },
{ OP_SEARCH_REVERSE, op_pager_search },
{ OP_SEARCH_NEXT, op_pager_search_next },
{ OP_SEARCH_OPPOSITE, op_pager_search_next },
{ OP_SEARCH_TOGGLE, op_search_toggle },
{ OP_VIEW_ATTACHMENTS, op_view_attachments },
{ 0, NULL },
}
static int op_exit(struct AliasFunctionData *fdata, const struct KeyEvent *event)
exit this menu - Implements alias_function_t -
Definition functions.c:235
static int op_help(struct EnterFunctionData *fdata, const struct KeyEvent *event)
Display Help - Implements enter_function_t -.
Definition functions.c:474
static int op_save(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Make decrypted copy - Implements index_function_t -.
Definition functions.c:2423
static int op_view_attachments(struct IndexFunctionData *fdata, const struct KeyEvent *event)
Show MIME attachments - Implements index_function_t -.
Definition functions.c:2707
static int op_pager_skip_quoted(struct PagerFunctionData *fdata, const struct KeyEvent *event)
Skip beyond quoted text - Implements pager_function_t -.
Definition functions.c:868
static int op_pager_search_next(struct PagerFunctionData *fdata, const struct KeyEvent *event)
Search for next match - Implements pager_function_t -.
Definition functions.c:731
static int op_pager_half_up(struct PagerFunctionData *fdata, const struct KeyEvent *event)
Scroll up 1/2 page - Implements pager_function_t -.
Definition functions.c:445
static int op_pager_next_page(struct PagerFunctionData *fdata, const struct KeyEvent *event)
Move to the next page - Implements pager_function_t -.
Definition functions.c:513
static int op_pager_prev_page(struct PagerFunctionData *fdata, const struct KeyEvent *event)
Move to the previous page - Implements pager_function_t -.
Definition functions.c:557
static int op_search_toggle(struct PagerFunctionData *fdata, const struct KeyEvent *event)
Toggle search pattern coloring - Implements pager_function_t -.
Definition functions.c:1076
static int op_pager_bottom(struct PagerFunctionData *fdata, const struct KeyEvent *event)
Jump to the bottom of the message - Implements pager_function_t -.
Definition functions.c:407
static int op_pager_hide_quoted(struct PagerFunctionData *fdata, const struct KeyEvent *event)
Toggle display of quoted text - Implements pager_function_t -.
Definition functions.c:465
static int op_pager_next_line(struct PagerFunctionData *fdata, const struct KeyEvent *event)
Scroll down one line - Implements pager_function_t -.
Definition functions.c:487
static int op_pager_prev_line(struct PagerFunctionData *fdata, const struct KeyEvent *event)
Scroll up one line - Implements pager_function_t -.
Definition functions.c:539
static int op_pager_skip_headers(struct PagerFunctionData *fdata, const struct KeyEvent *event)
Jump to first line after headers - Implements pager_function_t -.
Definition functions.c:829
static int op_pager_top(struct PagerFunctionData *fdata, const struct KeyEvent *event)
Jump to the top of the message - Implements pager_function_t -.
Definition functions.c:968
static int op_pager_half_down(struct PagerFunctionData *fdata, const struct KeyEvent *event)
Scroll down 1/2 page - Implements pager_function_t -.
Definition functions.c:419
static int op_pager_search(struct PagerFunctionData *fdata, const struct KeyEvent *event)
Search for a regular expression - Implements pager_function_t -.
Definition functions.c:581

All the NeoMutt functions that the Pager supports.

Definition at line 1115 of file functions.c.

1115 {
1116 // clang-format off
1117 { OP_EXIT, op_exit },
1118 { OP_HALF_DOWN, op_pager_half_down },
1119 { OP_HALF_UP, op_pager_half_up },
1120 { OP_HELP, op_help },
1121 { OP_NEXT_LINE, op_pager_next_line },
1122 { OP_NEXT_PAGE, op_pager_next_page },
1123 { OP_PAGER_BOTTOM, op_pager_bottom },
1124 { OP_PAGER_HIDE_QUOTED, op_pager_hide_quoted },
1125 { OP_PAGER_SKIP_HEADERS, op_pager_skip_headers },
1126 { OP_PAGER_SKIP_QUOTED, op_pager_skip_quoted },
1127 { OP_PAGER_TOP, op_pager_top },
1128 { OP_PREV_LINE, op_pager_prev_line },
1129 { OP_PREV_PAGE, op_pager_prev_page },
1130 { OP_SAVE, op_save },
1131 { OP_SEARCH, op_pager_search },
1132 { OP_SEARCH_REVERSE, op_pager_search },
1133 { OP_SEARCH_NEXT, op_pager_search_next },
1134 { OP_SEARCH_OPPOSITE, op_pager_search_next },
1135 { OP_SEARCH_TOGGLE, op_search_toggle },
1136 { OP_VIEW_ATTACHMENTS, op_view_attachments },
1137 { 0, NULL },
1138 // clang-format on
1139};