summaryrefslogtreecommitdiff
path: root/alpine/mailcmd.c
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2016-06-15 20:55:09 -0600
committerEduardo Chappa <chappa@washington.edu>2016-06-15 20:55:09 -0600
commit64a7802b19fd8f5fdab33fe687ffedbe3a8e9906 (patch)
tree48244ddf98f2cf4b58cfdbfad1ba55bfe4635332 /alpine/mailcmd.c
parent645fe0488129435c0b01e9fdc134cc71d6fb8579 (diff)
downloadalpine-64a7802b19fd8f5fdab33fe687ffedbe3a8e9906.tar.xz
* When messages are selected, warn the user if a message that is not
selected will be bounced, or if not all selected messages will be bounced. Suggested by Ulf-Dietrich Braumann.
Diffstat (limited to 'alpine/mailcmd.c')
-rw-r--r--alpine/mailcmd.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/alpine/mailcmd.c b/alpine/mailcmd.c
index 5e95d334..19becd11 100644
--- a/alpine/mailcmd.c
+++ b/alpine/mailcmd.c
@@ -2381,8 +2381,21 @@ cmd_bounce(struct pine *state, MSGNO_S *msgmap, int aopt)
ACTION_S *role = NULL;
if(any_messages(msgmap, NULL, "to Bounce")){
- if(MCMD_ISAGG(aopt) && !pseudo_selected(state->mail_stream, msgmap))
- return rv;
+ long i;
+ if(MCMD_ISAGG(aopt)){
+ if(!pseudo_selected(state->mail_stream, msgmap))
+ return rv;
+ }
+ else if((i = any_lflagged(msgmap, MN_SLCT)) > 0
+ && get_lflag(state->mail_stream, msgmap,
+ mn_m2raw(msgmap, mn_get_cur(msgmap)), MN_SLCT) == 0)
+ q_status_message(SM_ORDER | SM_DING, 3, 4,
+ _("WARNING: non-selected message is being bounced!"));
+ else if (i > 1L
+ && get_lflag(state->mail_stream, msgmap,
+ mn_m2raw(msgmap, mn_get_cur(msgmap)), MN_SLCT))
+ q_status_message(SM_ORDER | SM_DING, 3, 4,
+ _("WARNING: not bouncing all selected messages!"));
if(MCMD_ISAGG(aopt)){ /* check for possible role */
PAT_STATE pstate;