summaryrefslogtreecommitdiff
path: root/alpine/reply.c
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2016-08-29 20:41:35 -0600
committerEduardo Chappa <chappa@washington.edu>2016-08-29 20:41:35 -0600
commit7663f0dd87d15a7b53b81aecef8aaf5efd100d3f (patch)
tree5a4640877c9710d8184ae2810d12fd915d016622 /alpine/reply.c
parentb063cb1a02f7dd5c7f1220989edceb736efe2c3c (diff)
downloadalpine-7663f0dd87d15a7b53b81aecef8aaf5efd100d3f.tar.xz
* Bug: When implementing the alternate-reply-menu, some of the code
got moved to the beginning of the reply_text_query function, which made the function return before it initialized some variables, which were therefore initialized to default values, and not the values configured by the user. This made, for example, make Alpine place the signature at the top of a message, regardless of what the user had configured. Reported by Andreas Schamanek.
Diffstat (limited to 'alpine/reply.c')
-rw-r--r--alpine/reply.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/alpine/reply.c b/alpine/reply.c
index d13d041e..61fd1ec9 100644
--- a/alpine/reply.c
+++ b/alpine/reply.c
@@ -1016,27 +1016,25 @@ reply_text_query(struct pine *ps, long int many, ENVELOPE *env, char **prefix)
int ekey_num;
int orig_sf;
- if(F_OFF(F_ALT_REPLY_MENU, ps)
- && F_ON(F_AUTO_INCLUDE_IN_REPLY, ps)
- && F_OFF(F_ENABLE_EDIT_REPLY_INDENT, ps)
- && F_OFF(F_ALT_REPLY_MENU,ps))
- return(1);
-
- if(F_ON(F_ALT_REPLY_MENU, ps)){
- orig_sf = ps->reply.use_flowed = *prefix && **prefix ? (F_OFF(F_QUELL_FLOWED_TEXT, ps)
+ orig_sf = ps->reply.use_flowed = *prefix && **prefix ? (F_OFF(F_QUELL_FLOWED_TEXT, ps)
&& F_OFF(F_STRIP_WS_BEFORE_SEND, ps)
&& (strcmp(*prefix, "> ") == 0
|| strcmp(*prefix, ">") == 0)) : 0;
- ps->reply.strip_signature = ps->full_header == 0
+ ps->reply.strip_signature = ps->full_header == 0
&& (F_ON(F_ENABLE_STRIP_SIGDASHES, ps)
|| F_ON(F_ENABLE_SIGDASHES, ps));
- ps->reply.keep_attach = F_ON(F_ATTACHMENTS_IN_REPLY, ps);
- ps->reply.include_header = F_ON(F_INCLUDE_HEADER, ps);
- }
+ ps->reply.keep_attach = F_ON(F_ATTACHMENTS_IN_REPLY, ps);
+ ps->reply.include_header = F_ON(F_INCLUDE_HEADER, ps);
ps->reply.preserve_fields = F_ON(F_PRESERVE_ORIGINAL_FIELD, ps);
ps->reply.signature_bottom = F_ON(F_SIG_AT_BOTTOM, ps);
ps->reply.role_chosen = NULL;
+ if(F_OFF(F_ALT_REPLY_MENU, ps)
+ && F_ON(F_AUTO_INCLUDE_IN_REPLY, ps)
+ && F_OFF(F_ENABLE_EDIT_REPLY_INDENT, ps)
+ && F_OFF(F_ALT_REPLY_MENU,ps))
+ return(1);
+
while(1){
compose_style[ekey_num = 0].ch = 'y';
compose_style[ekey_num].rval = 'y';