summaryrefslogtreecommitdiffstats
path: root/init.c
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>1998-09-29 06:58:08 +0000
committerThomas Roessler <roessler@does-not-exist.org>1998-09-29 06:58:08 +0000
commitc2a49fbc2cd96af8a3eeb9eb383689dd94e0be30 (patch)
tree3ad09b9ec9a467f67eb9efd3267f48353b8a2867 /init.c
parent12cc52314fee4a83540896a9b81cec32ff808f7b (diff)
Add caching for a message's flags.
Diffstat (limited to 'init.c')
-rw-r--r--init.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/init.c b/init.c
index b18f2fc4..94f9ec4c 100644
--- a/init.c
+++ b/init.c
@@ -806,6 +806,14 @@ static int parse_set (BUFFER *tmp, BUFFER *s, unsigned long data, BUFFER *err)
break;
}
+ if (option(OPTATTACHMSG) && (!strcmp(MuttVars[idx].option, "alternates")
+ || !strcmp(MuttVars[idx].option, "reply_regexp")))
+ {
+ snprintf (err->data, err->dsize, "Operation not permitted when in attach-message mode.");
+ r = -1;
+ break;
+ }
+
s->dptr++;
/* copy the value of the string */
@@ -853,7 +861,8 @@ static int parse_set (BUFFER *tmp, BUFFER *s, unsigned long data, BUFFER *err)
ptr->rx = rx;
ptr->not = not;
- /* $reply_regexp requires special treatment */
+ /* $reply_regexp and $alterantes require special treatment */
+
if (Context && Context->msgcount &&
strcmp (MuttVars[idx].option, "reply_regexp") == 0)
{
@@ -873,6 +882,15 @@ static int parse_set (BUFFER *tmp, BUFFER *s, unsigned long data, BUFFER *err)
}
#undef CUR_ENV
}
+
+ if(Context && Context->msgcount &&
+ strcmp(MuttVars[idx].option, "alternates") == 0)
+ {
+ int i;
+
+ for(i = 0; i < Context->msgcount; i++)
+ Context->hdrs[i]->recip_valid = 0;
+ }
}
}
else if (DTYPE(MuttVars[idx].type) == DT_MAGIC)