NeoMutt  2025-12-11-769-g906513
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 priv->lines[i].syntax[0].attr_color = NULL;
161 priv->lines[i].syntax[0].first = -1;
162 priv->lines[i].syntax[0].last = -1;
163
164 if (priv->search_compiled && priv->lines[i].search)
165 FREE(&(priv->lines[i].search));
166 }
167
168 if (!repopulate)
169 {
170 priv->lines_used = 0;
171 priv->top_line = 0;
172 }
173
174 int i = -1;
175 int j = -1;
176 const PagerFlags flags = priv->has_types | priv->search_flag |
177 (priv->pview->flags & MUTT_PAGER_NOWRAP) |
178 (priv->pview->flags & MUTT_PAGER_STRIPES);
179
180 while (display_line(priv->fp, &priv->bytes_read, &priv->lines, ++i,
181 &priv->lines_used, &priv->lines_max, flags, &priv->quote_list,
182 &priv->q_level, &priv->force_redraw, &priv->search_re,
183 priv->pview->win_pager, &priv->ansi_list) == 0)
184 {
185 if (!priv->lines[i].cont_line && (++j == priv->win_height))
186 {
187 if (!repopulate)
188 priv->top_line = i;
189 if (!priv->search_flag)
190 break;
191 }
192 }
193 }
194
195 /* Phase 2: Repaint visible lines from top_line downward. Repeatedly
196 * calls display_line() for each row in the pager window. */
197 if ((priv->redraw & PAGER_REDRAW_PAGER) || (priv->top_line != priv->old_top_line))
198 {
199 do
200 {
201 mutt_window_move(priv->pview->win_pager, 0, 0);
202 priv->cur_line = priv->top_line;
203 priv->old_top_line = priv->top_line;
204 priv->win_height = 0;
205 priv->force_redraw = false;
206
207 while ((priv->win_height < priv->pview->win_pager->state.rows) &&
208 (priv->lines[priv->cur_line].offset <= priv->st.st_size - 1))
209 {
210 const PagerFlags flags = (priv->pview->flags & MUTT_DISPLAYFLAGS) |
211 priv->hide_quoted | priv->search_flag |
212 (priv->pview->flags & MUTT_PAGER_NOWRAP) |
213 (priv->pview->flags & MUTT_PAGER_STRIPES);
214
215 if (display_line(priv->fp, &priv->bytes_read, &priv->lines, priv->cur_line,
216 &priv->lines_used, &priv->lines_max, flags, &priv->quote_list,
217 &priv->q_level, &priv->force_redraw, &priv->search_re,
218 priv->pview->win_pager, &priv->ansi_list) > 0)
219 {
220 priv->win_height++;
221 }
222 priv->cur_line++;
223 mutt_window_move(priv->pview->win_pager, priv->win_height, 0);
224 }
225 } while (priv->force_redraw);
226
227 /* Fill remaining rows with tilde characters (like vi) */
228 const bool c_tilde = cs_subset_bool(NeoMutt->sub, "tilde");
230 while (priv->win_height < priv->pview->win_pager->state.rows)
231 {
233 if (c_tilde)
234 mutt_window_addch(priv->pview->win_pager, '~');
235 priv->win_height++;
236 mutt_window_move(priv->pview->win_pager, priv->win_height, 0);
237 }
239 }
240
242 mutt_debug(LL_DEBUG5, "repaint done\n");
243 return 0;
244}
245
250{
251 if (nc->event_type != NT_COLOR)
252 return 0;
253 if (!nc->global_data || !nc->event_data)
254 return -1;
255
256 struct EventColor *ev_c = nc->event_data;
257 struct MuttWindow *win_pager = nc->global_data;
258 struct PagerPrivateData *priv = win_pager->wdata;
259 if (!priv)
260 return 0;
261
262 // MT_COLOR_MAX is sent on `uncolor *`
263 if (COLOR_QUOTED(ev_c->cid) || (ev_c->cid == MT_COLOR_MAX))
264 {
265 // rework quoted colours
267 }
268
269 if (ev_c->cid == MT_COLOR_MAX)
270 {
271 for (size_t i = 0; i < priv->lines_max; i++)
272 {
273 FREE(&(priv->lines[i].syntax));
274 }
275 priv->lines_used = 0;
276 }
277 else if ((ev_c->cid == MT_COLOR_ATTACHMENT) || (ev_c->cid == MT_COLOR_ATTACH_HEADERS) ||
278 (ev_c->cid == MT_COLOR_BODY) || (ev_c->cid == MT_COLOR_BOLD) ||
279 (ev_c->cid == MT_COLOR_ERROR) || (ev_c->cid == MT_COLOR_HDRDEFAULT) ||
280 (ev_c->cid == MT_COLOR_HEADER) || (ev_c->cid == MT_COLOR_ITALIC) ||
281 (ev_c->cid == MT_COLOR_MARKERS) || (ev_c->cid == MT_COLOR_MESSAGE) ||
282 (ev_c->cid == MT_COLOR_NORMAL) || (ev_c->cid == MT_COLOR_SEARCH) ||
283 (ev_c->cid == MT_COLOR_SIGNATURE) || (ev_c->cid == MT_COLOR_STRIPE_EVEN) ||
284 (ev_c->cid == MT_COLOR_STRIPE_ODD) || (ev_c->cid == MT_COLOR_TILDE) ||
285 (ev_c->cid == MT_COLOR_UNDERLINE) || (ev_c->cid == MT_COLOR_WARNING))
286 {
288 }
289
290 mutt_debug(LL_DEBUG5, "color done\n");
291 return 0;
292}
293
298{
299 if (nc->event_type != NT_CONFIG)
300 return 0;
301 if (!nc->global_data || !nc->event_data)
302 return -1;
303
304 struct EventConfig *ev_c = nc->event_data;
305 struct MuttWindow *win_pager = nc->global_data;
306
307 if (mutt_str_equal(ev_c->name, "pager_index_lines"))
308 {
309 config_pager_index_lines(win_pager);
310 mutt_debug(LL_DEBUG5, "config done\n");
311 }
312 else if ((mutt_str_equal(ev_c->name, "allow_ansi")) ||
313 (mutt_str_equal(ev_c->name, "markers")) ||
314 (mutt_str_equal(ev_c->name, "smart_wrap")) ||
315 (mutt_str_equal(ev_c->name, "smileys")) ||
316 (mutt_str_equal(ev_c->name, "tilde")) ||
317 (mutt_str_equal(ev_c->name, "toggle_quoted_show_levels")) ||
318 (mutt_str_equal(ev_c->name, "wrap")))
319 {
320 struct PagerPrivateData *priv = win_pager->parent->wdata;
321 if (!priv)
322 return -1;
323
325 }
326
327 return 0;
328}
329
334{
335 if (nc->event_type != NT_INDEX)
336 return 0;
337 if (!nc->global_data)
338 return -1;
339
340 struct MuttWindow *win_pager = nc->global_data;
341
342 struct PagerPrivateData *priv = win_pager->wdata;
343 if (!priv)
344 return 0;
345
346 struct IndexSharedData *shared = nc->event_data;
347
349 {
350 win_pager->actions |= WA_RECALC;
351 mutt_debug(LL_DEBUG5, "index done, request WA_RECALC\n");
352 priv->loop = PAGER_LOOP_QUIT;
353 }
354 else if (nc->event_subtype & NT_INDEX_EMAIL)
355 {
356 win_pager->actions |= WA_RECALC;
357 mutt_debug(LL_DEBUG5, "index done, request WA_RECALC\n");
358 priv->pager_redraw = true;
359 if (shared && shared->email && (priv->loop != PAGER_LOOP_QUIT))
360 {
361 priv->loop = PAGER_LOOP_RELOAD;
362 }
363 else
364 {
365 priv->loop = PAGER_LOOP_QUIT;
366 priv->rc = 0;
367 }
368 }
369
370 return 0;
371}
372
377{
378 if (nc->event_type != NT_PAGER)
379 return 0;
380 if (!nc->global_data || !nc->event_data)
381 return -1;
382
383 struct MuttWindow *win_pager = nc->global_data;
384
385 struct PagerPrivateData *priv = win_pager->wdata;
386 if (!priv)
387 return 0;
388
390 mutt_debug(LL_DEBUG5, "pager done\n");
391 return 0;
392}
393
398{
399 if (nc->event_type != NT_WINDOW)
400 return 0;
401 if (!nc->global_data || !nc->event_data)
402 return -1;
404 return 0;
405
406 struct MuttWindow *win_pager = nc->global_data;
407 struct EventWindow *ev_w = nc->event_data;
408 if (ev_w->win != win_pager)
409 return 0;
410
411 struct PagerPrivateData *priv = win_pager->wdata;
412 if (!priv)
413 return 0;
414
415 struct MuttWindow *dlg = window_find_parent(win_pager, WT_DLG_INDEX);
416 if (!dlg)
417 dlg = window_find_parent(win_pager, WT_DLG_PAGER);
418
419 struct IndexSharedData *shared = dlg->wdata;
420
426
427 mutt_debug(LL_DEBUG5, "window delete done\n");
428
429 return 0;
430}
431
Color and attribute parsing.
void mutt_color_observer_remove(observer_t callback, void *global_data)
Remove an observer.
Definition notify.c:73
void mutt_color_observer_add(observer_t callback, void *global_data)
Add an observer.
Definition notify.c:62
@ 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:1058
Pager Display.
void pager_queue_redraw(struct PagerPrivateData *priv, PagerRedrawFlags redraw)
Queue a request for a redraw.
Definition dlg_pager.c:121
#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:376
static int pager_color_observer(struct NotifyCallback *nc)
Notification that a Color has changed - Implements observer_t -.
Definition pager.c:249
static int pager_config_observer(struct NotifyCallback *nc)
Notification that a Config Variable has changed - Implements observer_t -.
Definition pager.c:297
static int pager_index_observer(struct NotifyCallback *nc)
Notification that the Index has changed - Implements observer_t -.
Definition pager.c:333
static int pager_window_observer(struct NotifyCallback *nc)
Notification that a Window has changed - Implements observer_t -.
Definition pager.c:397
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:155
@ PAGER_LOOP_QUIT
Quit the Pager.
Definition lib.h:154
#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
#define MUTT_DISPLAYFLAGS
Definition lib.h:80
uint16_t PagerFlags
Flags for dlg_pager(), e.g. MUTT_SHOWFLAT.
Definition lib.h:62
#define MUTT_PAGER_STRIPES
Striped highlighting.
Definition lib.h:77
#define PAGER_REDRAW_FLOW
Reflow the pager.
Definition lib.h:193
#define PAGER_REDRAW_PAGER
Redraw the pager.
Definition lib.h:192
#define PAGER_REDRAW_NO_FLAGS
No flags are set.
Definition lib.h:191
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:438
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:52
enum ColorId cid
Colour ID that has changed.
Definition notify2.h:53
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:174
PagerFlags flags
Additional settings to tweak pager's function.
Definition lib.h:176
struct MuttWindow * win_pager
Pager Window.
Definition lib.h:181
Highlighting for a piece of text.
Definition display.h:39
const struct AttrColor * attr_color
Curses colour of text.
Definition display.h:40
int last
Last character in line to be coloured (not included)
Definition display.h:42
int first
First character in line to be coloured.
Definition display.h:41
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