NeoMutt  2025-12-11-694-ga89709
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
pager.c
Go to the documentation of this file.
1
25
63
64#include "config.h"
65#include <stdbool.h>
66#include <stddef.h>
67#include <sys/stat.h>
68#include "mutt/lib.h"
69#include "config/lib.h"
70#include "core/lib.h"
71#include "gui/lib.h"
72#include "debug/lib.h"
73#include "lib.h"
74#include "color/lib.h"
75#include "index/lib.h"
76#include "display.h"
77#include "private_data.h"
78
85static int config_pager_index_lines(struct MuttWindow *win)
86{
87 if (!mutt_window_is_visible(win))
88 return 0;
89
90 struct MuttWindow *dlg = dialog_find(win);
91 struct MuttWindow *panel_index = window_find_child(dlg, WT_INDEX);
92 struct MuttWindow *win_index = window_find_child(panel_index, WT_MENU);
93 if (!win_index)
94 return -1;
95
96 const short c_pager_index_lines = cs_subset_number(NeoMutt->sub, "pager_index_lines");
97
98 if (c_pager_index_lines > 0)
99 {
100 win_index->req_rows = c_pager_index_lines;
101 win_index->size = MUTT_WIN_SIZE_FIXED;
102
103 panel_index->size = MUTT_WIN_SIZE_MINIMISE;
104 panel_index->state.visible = true;
105 }
106 else
107 {
109 win_index->size = MUTT_WIN_SIZE_MAXIMISE;
110
111 panel_index->size = MUTT_WIN_SIZE_MAXIMISE;
112 panel_index->state.visible = false;
113 }
114
116 mutt_debug(LL_DEBUG5, "config, request WA_REFLOW\n");
117 return 0;
118}
119
123static int pager_recalc(struct MuttWindow *win)
124{
125 win->actions |= WA_REPAINT;
126 mutt_debug(LL_DEBUG5, "recalc done, request WA_REPAINT\n");
127 return 0;
128}
129
133static int pager_repaint(struct MuttWindow *win)
134{
135 struct PagerPrivateData *priv = win->wdata;
136 if (!priv || !priv->pview || !priv->pview->pdata)
137 return 0;
138
139 dump_pager(priv);
140
141 /* Phase 1: Reflow the content if the window was resized or needs repopulating.
142 * Reset all line metadata and re-display lines up to the current position. */
143 const bool repopulate = (priv->cur_line > priv->lines_used);
144 if ((priv->redraw & PAGER_REDRAW_FLOW) || repopulate)
145 {
146 priv->win_height = -1;
147 for (int i = 0; i <= priv->top_line; i++)
148 if (!priv->lines[i].cont_line)
149 priv->win_height++;
150 for (int i = 0; i < priv->lines_max; i++)
151 {
152 priv->lines[i].offset = 0;
153 priv->lines[i].cid = -1;
154 priv->lines[i].cont_line = false;
155 priv->lines[i].syntax_arr_size = 0;
156 priv->lines[i].search_arr_size = -1;
157 priv->lines[i].quote = NULL;
158
159 MUTT_MEM_REALLOC(&(priv->lines[i].syntax), 1, struct TextSyntax);
160 if (priv->search_compiled && priv->lines[i].search)
161 FREE(&(priv->lines[i].search));
162 }
163
164 if (!repopulate)
165 {
166 priv->lines_used = 0;
167 priv->top_line = 0;
168 }
169
170 int i = -1;
171 int j = -1;
172 const PagerFlags flags = priv->has_types | priv->search_flag |
173 (priv->pview->flags & MUTT_PAGER_NOWRAP) |
174 (priv->pview->flags & MUTT_PAGER_STRIPES);
175
176 while (display_line(priv->fp, &priv->bytes_read, &priv->lines, ++i,
177 &priv->lines_used, &priv->lines_max, flags, &priv->quote_list,
178 &priv->q_level, &priv->force_redraw, &priv->search_re,
179 priv->pview->win_pager, &priv->ansi_list) == 0)
180 {
181 if (!priv->lines[i].cont_line && (++j == priv->win_height))
182 {
183 if (!repopulate)
184 priv->top_line = i;
185 if (!priv->search_flag)
186 break;
187 }
188 }
189 }
190
191 /* Phase 2: Repaint visible lines from top_line downward. Repeatedly
192 * calls display_line() for each row in the pager window. */
193 if ((priv->redraw & PAGER_REDRAW_PAGER) || (priv->top_line != priv->old_top_line))
194 {
195 do
196 {
197 mutt_window_move(priv->pview->win_pager, 0, 0);
198 priv->cur_line = priv->top_line;
199 priv->old_top_line = priv->top_line;
200 priv->win_height = 0;
201 priv->force_redraw = false;
202
203 while ((priv->win_height < priv->pview->win_pager->state.rows) &&
204 (priv->lines[priv->cur_line].offset <= priv->st.st_size - 1))
205 {
206 const PagerFlags flags = (priv->pview->flags & MUTT_DISPLAYFLAGS) |
207 priv->hide_quoted | priv->search_flag |
208 (priv->pview->flags & MUTT_PAGER_NOWRAP) |
209 (priv->pview->flags & MUTT_PAGER_STRIPES);
210
211 if (display_line(priv->fp, &priv->bytes_read, &priv->lines, priv->cur_line,
212 &priv->lines_used, &priv->lines_max, flags, &priv->quote_list,
213 &priv->q_level, &priv->force_redraw, &priv->search_re,
214 priv->pview->win_pager, &priv->ansi_list) > 0)
215 {
216 priv->win_height++;
217 }
218 priv->cur_line++;
219 mutt_window_move(priv->pview->win_pager, priv->win_height, 0);
220 }
221 } while (priv->force_redraw);
222
223 /* Fill remaining rows with tilde characters (like vi) */
224 const bool c_tilde = cs_subset_bool(NeoMutt->sub, "tilde");
226 while (priv->win_height < priv->pview->win_pager->state.rows)
227 {
229 if (c_tilde)
230 mutt_window_addch(priv->pview->win_pager, '~');
231 priv->win_height++;
232 mutt_window_move(priv->pview->win_pager, priv->win_height, 0);
233 }
235 }
236
238 mutt_debug(LL_DEBUG5, "repaint done\n");
239 return 0;
240}
241
246{
247 if (nc->event_type != NT_COLOR)
248 return 0;
249 if (!nc->global_data || !nc->event_data)
250 return -1;
251
252 struct EventColor *ev_c = nc->event_data;
253 struct MuttWindow *win_pager = nc->global_data;
254 struct PagerPrivateData *priv = win_pager->wdata;
255 if (!priv)
256 return 0;
257
258 // MT_COLOR_MAX is sent on `uncolor *`
259 if (COLOR_QUOTED(ev_c->cid) || (ev_c->cid == MT_COLOR_MAX))
260 {
261 // rework quoted colours
263 }
264
265 if (ev_c->cid == MT_COLOR_MAX)
266 {
267 for (size_t i = 0; i < priv->lines_max; i++)
268 {
269 FREE(&(priv->lines[i].syntax));
270 }
271 priv->lines_used = 0;
272 }
273 else if ((ev_c->cid == MT_COLOR_ATTACHMENT) || (ev_c->cid == MT_COLOR_ATTACH_HEADERS) ||
274 (ev_c->cid == MT_COLOR_BODY) || (ev_c->cid == MT_COLOR_BOLD) ||
275 (ev_c->cid == MT_COLOR_ERROR) || (ev_c->cid == MT_COLOR_HDRDEFAULT) ||
276 (ev_c->cid == MT_COLOR_HEADER) || (ev_c->cid == MT_COLOR_ITALIC) ||
277 (ev_c->cid == MT_COLOR_MARKERS) || (ev_c->cid == MT_COLOR_MESSAGE) ||
278 (ev_c->cid == MT_COLOR_NORMAL) || (ev_c->cid == MT_COLOR_SEARCH) ||
279 (ev_c->cid == MT_COLOR_SIGNATURE) || (ev_c->cid == MT_COLOR_STRIPE_EVEN) ||
280 (ev_c->cid == MT_COLOR_STRIPE_ODD) || (ev_c->cid == MT_COLOR_TILDE) ||
281 (ev_c->cid == MT_COLOR_UNDERLINE) || (ev_c->cid == MT_COLOR_WARNING))
282 {
284 }
285
286 mutt_debug(LL_DEBUG5, "color done\n");
287 return 0;
288}
289
294{
295 if (nc->event_type != NT_CONFIG)
296 return 0;
297 if (!nc->global_data || !nc->event_data)
298 return -1;
299
300 struct EventConfig *ev_c = nc->event_data;
301 struct MuttWindow *win_pager = nc->global_data;
302
303 if (mutt_str_equal(ev_c->name, "pager_index_lines"))
304 {
305 config_pager_index_lines(win_pager);
306 mutt_debug(LL_DEBUG5, "config done\n");
307 }
308 else if ((mutt_str_equal(ev_c->name, "allow_ansi")) ||
309 (mutt_str_equal(ev_c->name, "markers")) ||
310 (mutt_str_equal(ev_c->name, "smart_wrap")) ||
311 (mutt_str_equal(ev_c->name, "smileys")) ||
312 (mutt_str_equal(ev_c->name, "tilde")) ||
313 (mutt_str_equal(ev_c->name, "toggle_quoted_show_levels")) ||
314 (mutt_str_equal(ev_c->name, "wrap")))
315 {
316 struct PagerPrivateData *priv = win_pager->parent->wdata;
317 if (!priv)
318 return -1;
319
321 }
322
323 return 0;
324}
325
330{
331 if (nc->event_type != NT_INDEX)
332 return 0;
333 if (!nc->global_data)
334 return -1;
335
336 struct MuttWindow *win_pager = nc->global_data;
337
338 struct PagerPrivateData *priv = win_pager->wdata;
339 if (!priv)
340 return 0;
341
342 struct IndexSharedData *shared = nc->event_data;
343
345 {
346 win_pager->actions |= WA_RECALC;
347 mutt_debug(LL_DEBUG5, "index done, request WA_RECALC\n");
348 priv->loop = PAGER_LOOP_QUIT;
349 }
350 else if (nc->event_subtype & NT_INDEX_EMAIL)
351 {
352 win_pager->actions |= WA_RECALC;
353 mutt_debug(LL_DEBUG5, "index done, request WA_RECALC\n");
354 priv->pager_redraw = true;
355 if (shared && shared->email && (priv->loop != PAGER_LOOP_QUIT))
356 {
357 priv->loop = PAGER_LOOP_RELOAD;
358 }
359 else
360 {
361 priv->loop = PAGER_LOOP_QUIT;
362 priv->rc = 0;
363 }
364 }
365
366 return 0;
367}
368
373{
374 if (nc->event_type != NT_PAGER)
375 return 0;
376 if (!nc->global_data || !nc->event_data)
377 return -1;
378
379 struct MuttWindow *win_pager = nc->global_data;
380
381 struct PagerPrivateData *priv = win_pager->wdata;
382 if (!priv)
383 return 0;
384
386 mutt_debug(LL_DEBUG5, "pager done\n");
387 return 0;
388}
389
394{
395 if (nc->event_type != NT_WINDOW)
396 return 0;
397 if (!nc->global_data || !nc->event_data)
398 return -1;
400 return 0;
401
402 struct MuttWindow *win_pager = nc->global_data;
403 struct EventWindow *ev_w = nc->event_data;
404 if (ev_w->win != win_pager)
405 return 0;
406
407 struct PagerPrivateData *priv = win_pager->wdata;
408 if (!priv)
409 return 0;
410
411 struct MuttWindow *dlg = window_find_parent(win_pager, WT_DLG_INDEX);
412 if (!dlg)
413 dlg = window_find_parent(win_pager, WT_DLG_PAGER);
414
415 struct IndexSharedData *shared = dlg->wdata;
416
422
423 mutt_debug(LL_DEBUG5, "window delete done\n");
424
425 return 0;
426}
427
Color and attribute parsing.
void mutt_color_observer_remove(observer_t callback, void *global_data)
Remove an observer.
Definition notify.c:71
void mutt_color_observer_add(observer_t callback, void *global_data)
Add an observer.
Definition notify.c:61
@ MT_COLOR_MARKERS
Pager: markers, line continuation.
Definition color.h:51
@ MT_COLOR_MESSAGE
Informational message.
Definition color.h:52
@ MT_COLOR_MAX
Definition color.h:97
@ MT_COLOR_HEADER
Message headers (takes a pattern)
Definition color.h:48
@ MT_COLOR_STRIPE_EVEN
Stripes: even lines of the Help Page.
Definition color.h:79
@ MT_COLOR_ERROR
Error message.
Definition color.h:46
@ MT_COLOR_BOLD
Bold text.
Definition color.h:40
@ MT_COLOR_BODY
Pager: highlight body of message (takes a pattern)
Definition color.h:39
@ MT_COLOR_HDRDEFAULT
Header default colour.
Definition color.h:47
@ MT_COLOR_NORMAL
Plain text.
Definition color.h:53
@ MT_COLOR_ATTACH_HEADERS
MIME attachment test (takes a pattern)
Definition color.h:38
@ MT_COLOR_SEARCH
Pager: search matches.
Definition color.h:67
@ MT_COLOR_ITALIC
Italic text.
Definition color.h:50
@ MT_COLOR_STRIPE_ODD
Stripes: odd lines of the Help Page.
Definition color.h:80
@ MT_COLOR_ATTACHMENT
MIME attachments text (entire line)
Definition color.h:37
@ MT_COLOR_WARNING
Warning messages.
Definition color.h:84
@ MT_COLOR_UNDERLINE
Underlined text.
Definition color.h:83
@ MT_COLOR_SIGNATURE
Pager: signature lines.
Definition color.h:77
@ MT_COLOR_TILDE
Pager: empty lines after message.
Definition color.h:81
short cs_subset_number(const struct ConfigSubset *sub, const char *name)
Get a number config item by name.
Definition helpers.c:143
bool cs_subset_bool(const struct ConfigSubset *sub, const char *name)
Get a boolean config item by name.
Definition helpers.c:47
Convenience wrapper for the config headers.
Convenience wrapper for the core headers.
Convenience wrapper for the debug headers.
void dump_pager(struct PagerPrivateData *priv)
Dump pager state.
Definition pager.c:146
struct MuttWindow * dialog_find(struct MuttWindow *win)
Find the parent Dialog of a Window.
Definition dialog.c:89
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:1053
Pager Display.
void pager_queue_redraw(struct PagerPrivateData *priv, PagerRedrawFlags redraw)
Queue a request for a redraw.
Definition dlg_pager.c:125
#define mutt_debug(LEVEL,...)
Definition logging2.h:91
static int pager_pager_observer(struct NotifyCallback *nc)
Notification that the Pager has changed - Implements observer_t -.
Definition pager.c:372
static int pager_color_observer(struct NotifyCallback *nc)
Notification that a Color has changed - Implements observer_t -.
Definition pager.c:245
static int pager_config_observer(struct NotifyCallback *nc)
Notification that a Config Variable has changed - Implements observer_t -.
Definition pager.c:293
static int pager_index_observer(struct NotifyCallback *nc)
Notification that the Index has changed - Implements observer_t -.
Definition pager.c:329
static int pager_window_observer(struct NotifyCallback *nc)
Notification that a Window has changed - Implements observer_t -.
Definition pager.c:393
static int pager_recalc(struct MuttWindow *win)
Recalculate the Pager display - Implements MuttWindow::recalc() -.
Definition pager.c:123
static int pager_repaint(struct MuttWindow *win)
Repaint the Pager display - Implements MuttWindow::repaint() -.
Definition pager.c:133
Convenience wrapper for the gui headers.
GUI manage the main index (list of emails)
#define NT_INDEX_MAILBOX
Mailbox has changed.
Definition lib.h:75
#define NT_INDEX_EMAIL
Email has changed.
Definition lib.h:76
@ LL_DEBUG5
Log at debug level 5.
Definition logging2.h:49
#define FREE(x)
Free memory and set the pointer to NULL.
Definition memory.h:68
#define MUTT_MEM_REALLOC(pptr, n, type)
Definition memory.h:55
Convenience wrapper for the library headers.
bool notify_observer_remove(struct Notify *notify, const observer_t callback, const void *global_data)
Remove an observer from an object.
Definition notify.c:230
bool notify_observer_add(struct Notify *notify, enum NotifyType type, observer_t callback, void *global_data)
Add an observer to an object.
Definition notify.c:191
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
bool mutt_str_equal(const char *a, const char *b)
Compare two strings.
Definition string.c:665
const struct AttrColor * mutt_curses_set_normal_backed_color_by_id(enum ColorId cid)
Set the colour and attributes by the Colour ID.
Definition mutt_curses.c:63
const struct AttrColor * mutt_curses_set_color_by_id(enum ColorId cid)
Set the colour and attributes by the Colour ID.
Definition mutt_curses.c:79
bool mutt_window_is_visible(struct MuttWindow *win)
Is the Window visible?
void mutt_window_reflow(struct MuttWindow *win)
Resize a Window and its children.
struct MuttWindow * window_find_parent(struct MuttWindow *win, enum WindowType type)
Find a (grand-)parent of a Window by type.
struct MuttWindow * mutt_window_new(enum WindowType type, enum MuttWindowOrientation orient, enum MuttWindowSize size, int cols, int rows)
Create a new Window.
int mutt_window_move(struct MuttWindow *win, int row, int col)
Move the cursor in a Window.
struct MuttWindow * window_find_child(struct MuttWindow *win, enum WindowType type)
Recursively find a child Window of a given type.
void mutt_window_clrtoeol(struct MuttWindow *win)
Clear to the end of the line.
int mutt_window_addch(struct MuttWindow *win, int ch)
Write one character to a Window.
#define WA_RECALC
Recalculate the contents of the Window.
@ WT_CUSTOM
Window with a custom drawing function.
Definition mutt_window.h:94
@ WT_DLG_INDEX
Index Dialog, dlg_index()
Definition mutt_window.h:86
@ WT_INDEX
A panel containing the Index Window.
Definition mutt_window.h:96
@ WT_DLG_PAGER
Pager Dialog, dlg_pager()
Definition mutt_window.h:84
@ WT_MENU
An Window containing a Menu.
Definition mutt_window.h:97
@ MUTT_WIN_ORIENT_VERTICAL
Window uses all available vertical space.
Definition mutt_window.h:38
@ NT_WINDOW_DELETE
Window is about to be deleted.
#define WA_REPAINT
Redraw the contents of the Window.
#define MUTT_WIN_SIZE_UNLIMITED
Use as much space as possible.
Definition mutt_window.h:52
@ MUTT_WIN_SIZE_FIXED
Window has a fixed size.
Definition mutt_window.h:47
@ MUTT_WIN_SIZE_MINIMISE
Window size depends on its children.
Definition mutt_window.h:49
@ MUTT_WIN_SIZE_MAXIMISE
Window wants as much space as possible.
Definition mutt_window.h:48
@ NT_WINDOW
MuttWindow has changed, NotifyWindow, EventWindow.
Definition notify_type.h:57
@ NT_CONFIG
Config has changed, NotifyConfig, EventConfig.
Definition notify_type.h:43
@ NT_COLOR
Colour has changed, NotifyColor, EventColor.
Definition notify_type.h:41
@ NT_PAGER
Pager data has changed, NotifyPager, PagerPrivateData.
Definition notify_type.h:53
@ NT_INDEX
Index data has changed, NotifyIndex, IndexSharedData.
Definition notify_type.h:48
GUI display a file/email/help in a viewport with paging.
@ PAGER_LOOP_RELOAD
Reload the Pager from scratch.
Definition lib.h:154
@ PAGER_LOOP_QUIT
Quit the Pager.
Definition lib.h:153
#define NT_PAGER_VIEW
Pager View has changed.
Definition lib.h:187
#define MUTT_PAGER_NOWRAP
Format for term width, ignore $wrap.
Definition lib.h:73
#define MUTT_DISPLAYFLAGS
Definition lib.h:79
uint16_t PagerFlags
Flags for dlg_pager(), e.g. MUTT_SHOWFLAT.
Definition lib.h:61
#define MUTT_PAGER_STRIPES
Striped highlighting.
Definition lib.h:76
#define PAGER_REDRAW_FLOW
Reflow the pager.
Definition lib.h:192
#define PAGER_REDRAW_PAGER
Redraw the pager.
Definition lib.h:191
#define PAGER_REDRAW_NO_FLAGS
No flags are set.
Definition lib.h:190
static int config_pager_index_lines(struct MuttWindow *win)
React to changes to $pager_index_lines.
Definition pager.c:85
struct MuttWindow * pager_window_new(struct IndexSharedData *shared, struct PagerPrivateData *priv)
Create a new Pager Window (list of Emails)
Definition pager.c:434
Private state data for the Pager.
void qstyle_recolor(struct QuoteStyle *quote_list)
Recolour quotes after colour changes.
Definition qstyle.c:464
#define COLOR_QUOTED(cid)
Definition quoted.h:28
struct Notify * notify
Notifications: NotifyConfig, EventConfig.
Definition subset.h:51
An Event that happened to a Colour.
Definition notify2.h:54
enum ColorId cid
Colour ID that has changed.
Definition notify2.h:55
A config-change event.
Definition subset.h:70
const char * name
Name of config item that changed.
Definition subset.h:72
An Event that happened to a Window.
struct MuttWindow * win
Window that changed.
Data shared between Index, Pager and Sidebar.
Definition shared_data.h:37
struct Email * email
Currently selected Email.
Definition shared_data.h:42
struct Notify * notify
Notifications: NotifyIndex, IndexSharedData.
Definition shared_data.h:44
short search_arr_size
Number of items in search array.
Definition display.h:59
struct TextSyntax * search
Array of search text in the line.
Definition display.h:60
bool cont_line
Continuation of a previous line (wrapped by NeoMutt)
Definition display.h:53
short cid
Default line colour, e.g. MT_COLOR_SIGNATURE.
Definition display.h:52
struct QuoteStyle * quote
Quoting style for this line (pointer into PagerPrivateData->quote_list)
Definition display.h:62
LOFF_T offset
Offset into Email file (PagerPrivateData->fp)
Definition display.h:51
short syntax_arr_size
Number of items in syntax array.
Definition display.h:56
struct TextSyntax * syntax
Array of coloured text in the line.
Definition display.h:57
int(* repaint)(struct MuttWindow *win)
struct WindowState state
Current state of the Window.
void * wdata
Private data.
struct Notify * notify
Notifications: NotifyWindow, EventWindow.
short req_rows
Number of rows required.
int(* recalc)(struct MuttWindow *win)
struct MuttWindow * parent
Parent Window.
WindowActionFlags actions
Actions to be performed, e.g. WA_RECALC.
enum MuttWindowSize size
Type of Window, e.g. MUTT_WIN_SIZE_FIXED.
Container for Accounts, Notifications.
Definition neomutt.h:41
struct ConfigSubset * sub
Inherited config items.
Definition neomutt.h:49
Data passed to a notification function.
Definition observer.h:34
void * event_data
Data from notify_send()
Definition observer.h:38
enum NotifyType event_type
Send: Event type, e.g. NT_ACCOUNT.
Definition observer.h:36
int event_subtype
Send: Event subtype, e.g. NT_ACCOUNT_ADD.
Definition observer.h:37
void * global_data
Data from notify_observer_add()
Definition observer.h:39
Private state data for the Pager.
PagerFlags hide_quoted
Set to MUTT_HIDE when quoted email is hidden <toggle-quoted>
int rc
Return code from functions.
int q_level
Number of unique quoting levels.
int cur_line
Current line (last line visible on screen)
bool pager_redraw
Force a complete redraw.
int lines_used
Size of lines array (used entries)
int lines_max
Capacity of lines array (total entries)
bool force_redraw
Repaint is needed.
enum PagerLoopMode loop
What the Event Loop should do next, e.g. PAGER_LOOP_CONTINUE.
struct Line * lines
Array of text lines in pager.
PagerRedrawFlags redraw
When to redraw the screen.
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.
int win_height
Number of lines in the Window.
int old_top_line
Old top line, used for repainting.
FILE * fp
File containing decrypted/decoded/weeded Email.
PagerFlags search_flag
Set to MUTT_SEARCH when search results are visible <search-toggle>
bool search_compiled
Search regex is in use.
struct PagerData * pdata
Data that pager displays. NOTNULL.
Definition lib.h:173
PagerFlags flags
Additional settings to tweak pager's function.
Definition lib.h:175
struct MuttWindow * win_pager
Pager Window.
Definition lib.h:180
Highlighting for a piece of text.
Definition display.h:39
bool visible
Window is visible.
Definition mutt_window.h:59
short rows
Number of rows, can be MUTT_WIN_SIZE_UNLIMITED.
Definition mutt_window.h:61