* they will be visible in the limited view */
if (ctx->pattern)
{
- int padding = mx_msg_padding_size(ctx);
+ int padding = mx_msg_padding_size(ctx->mailbox);
for (int i = (check == MUTT_REOPENED) ? 0 : oldcount; i < ctx->mailbox->msg_count; i++)
{
if (!i)
m->vcount = 0;
ctx->vsize = 0;
- int padding = mx_msg_padding_size(ctx);
+ int padding = mx_msg_padding_size(m);
for (int i = 0; i < m->msg_count; i++)
{
m->msg_unread = 0;
m->changed = false;
m->msg_flagged = 0;
- padding = mx_msg_padding_size(ctx);
+ padding = mx_msg_padding_size(m);
for (i = 0, j = 0; i < m->msg_count; i++)
{
if (!m->hdrs[i]->quasi_deleted &&
/**
* mx_msg_padding_size - Bytes of padding between messages - Wrapper for MxOps::msg_padding_size
- * @param ctx Mailbox
+ * @param m Mailbox
* @retval num Number of bytes of padding
*
* mmdf and mbox add separators, which leads a small discrepancy when computing
* vsize for a limited view.
*/
-int mx_msg_padding_size(struct Context *ctx)
+int mx_msg_padding_size(struct Mailbox *m)
{
- if (!ctx || !ctx->mailbox)
- return 0;
-
- struct Mailbox *m = ctx->mailbox;
-
- if (!m->mx_ops || !m->mx_ops->msg_padding_size)
+ if (!m || !m->mx_ops || !m->mx_ops->msg_padding_size)
return 0;
return m->mx_ops->msg_padding_size(m);
int mx_msg_commit (struct Context *ctx, struct Message *msg);
struct Message *mx_msg_open_new (struct Mailbox *m, struct Email *e, int flags);
struct Message *mx_msg_open (struct Mailbox *m, int msgno);
-int mx_msg_padding_size(struct Context *ctx);
+int mx_msg_padding_size(struct Mailbox *m);
int mx_path_canon (char *buf, size_t buflen, const char *folder, int *magic);
int mx_path_canon2 (struct Mailbox *m, const char *folder);
int mx_path_parent (char *buf, size_t buflen);
int mx_path_pretty (char *buf, size_t buflen, const char *folder);
-enum MailboxType mx_path_probe (const char *path, struct stat *st);
+enum MailboxType mx_path_probe (const char *path, struct stat *st);
int mx_tags_commit (struct Context *ctx, struct Email *e, char *tags);
int mx_tags_edit (struct Context *ctx, const char *tags, char *buf, size_t buflen);
Context->mailbox->vcount = 0;
Context->vsize = 0;
Context->collapsed = false;
- padding = mx_msg_padding_size(Context);
+ padding = mx_msg_padding_size(Context->mailbox);
for (int i = 0; i < Context->mailbox->msg_count; i++)
{