Index: mutt/ChangeLog =================================================================== RCS file: /home/roessler/cvs/mutt/ChangeLog,v retrieving revision 3.635 retrieving revision 3.641 diff -u -p -r3.635 -r3.641 --- mutt/ChangeLog 1 Nov 2005 08:43:14 -0000 3.635 +++ mutt/ChangeLog 24 Nov 2005 12:51:12 -0000 3.641 @@ -1,3 +1,24 @@ +2005-11-24 12:50:27 Thomas Roessler (roessler) + + * curs_main.c, pattern.c: mutt/2142 suggests that the change + from pattern.c,3.14 -> 3.15 causes inconsistency and confusion. + Reverting the change; adding a helpful message to the status line. + +2005-11-22 12:31:58 Thomas Roessler (roessler) + + * pgp.c: Fix "mixed messages" about the success (or not) of + decrypting PGP messages. + + * handler.c: Actually, the previous fix for 2139 had a flaw. + + * handler.c: Fix mutt/2139; also Debian #340116. + +2005-11-17 18:40:50 Thomas Roessler (roessler) + + * menu.c: a not entirely sane state of code. + + * menu.c: Another stab at #2019. + 2005-11-01 08:42:00 Thomas Roessler (roessler) * menu.c: This should be a better patch for the menu break Index: mutt/curs_main.c =================================================================== RCS file: /home/roessler/cvs/mutt/curs_main.c,v retrieving revision 3.34 retrieving revision 3.35 diff -u -p -r3.34 -r3.35 --- mutt/curs_main.c 4 Oct 2005 04:29:09 -0000 3.34 +++ mutt/curs_main.c 24 Nov 2005 12:50:27 -0000 3.35 @@ -868,6 +868,8 @@ CHECK_IMAP_ACL(IMAP_ACL_DELETE); mutt_draw_tree (Context); menu->redraw = REDRAW_FULL; } + if (Context->pattern) + mutt_message _("To view all messages, limit to \"all\"."); break; case OP_QUIT: Index: mutt/handler.c =================================================================== RCS file: /home/roessler/cvs/mutt/handler.c,v retrieving revision 3.23 retrieving revision 3.25 diff -u -p -r3.23 -r3.25 --- mutt/handler.c 21 Oct 2005 04:35:37 -0000 3.23 +++ mutt/handler.c 22 Nov 2005 12:21:14 -0000 3.25 @@ -1754,16 +1754,16 @@ void mutt_decode_attachment (BODY *b, ST switch (b->encoding) { case ENCQUOTEDPRINTABLE: - mutt_decode_quoted (s, b->length, istext, cd); + mutt_decode_quoted (s, b->length, istext || ((WithCrypto & APPLICATION_PGP) && mutt_is_application_pgp (b)), cd); break; case ENCBASE64: - mutt_decode_base64 (s, b->length, istext, cd); + mutt_decode_base64 (s, b->length, istext || ((WithCrypto & APPLICATION_PGP) && mutt_is_application_pgp (b)), cd); break; case ENCUUENCODED: - mutt_decode_uuencoded (s, b->length, istext, cd); + mutt_decode_uuencoded (s, b->length, istext || ((WithCrypto & APPLICATION_PGP) && mutt_is_application_pgp (b)), cd); break; default: - mutt_decode_xbit (s, b->length, istext, cd); + mutt_decode_xbit (s, b->length, istext || ((WithCrypto & APPLICATION_PGP) && mutt_is_application_pgp (b)), cd); break; } Index: mutt/menu.c =================================================================== RCS file: /home/roessler/cvs/mutt/menu.c,v retrieving revision 3.23 retrieving revision 3.25 diff -u -p -r3.23 -r3.25 --- mutt/menu.c 1 Nov 2005 08:42:00 -0000 3.23 +++ mutt/menu.c 17 Nov 2005 18:40:50 -0000 3.25 @@ -379,36 +379,27 @@ void menu_check_recenter (MUTTMENU *menu if (!option (OPTMENUMOVEOFF) && menu->max <= menu->pagelen) /* less entries than lines */ { - if (menu->top != 0) { + if (menu->top != 0) + { menu->top = 0; set_option (OPTNEEDREDRAW); } } else { - /* - * If c = menu->pagelen / 2 and menu->pagelen is even, then (obviously): - * - * menu->top + menu->pagelen - c == menu->top + c - * - * In that case, having an "else if" below leads to what has become known as the - * indicator break dance effect. Instead of special-casing, we just forget the - * "else". - */ - - if (menu->current < menu->top + c) /* indicator above top threshold */ + if (option (OPTMENUSCROLL) || (menu->pagelen <= 0) || (c < MenuContext)) { - if (option (OPTMENUSCROLL) || (menu->pagelen <= 0)) + if (menu->current < menu->top + c) menu->top = menu->current - c; - else - menu->top -= (menu->pagelen - c) * ((menu->top + menu->pagelen - 1 - menu->current) / (menu->pagelen - c)) - c; + else if (menu->current >= menu->top + menu->pagelen - c) + menu->top = menu->current - menu->pagelen + c + 1; } - if (menu->current >= menu->top + menu->pagelen - c) /* indicator below bottom threshold */ + else { - if (option (OPTMENUSCROLL) || (menu->pagelen <= 0)) - menu->top = menu->current - menu->pagelen + c + 1; - else - menu->top += (menu->pagelen - c) * ((menu->current - menu->top) / (menu->pagelen - c)) - c; + if (menu->current < menu->top + c) + menu->top -= (menu->pagelen - c) * ((menu->top + menu->pagelen - 1 - menu->current) / (menu->pagelen - c)) - c; + else if ((menu->current >= menu->top + menu->pagelen - c)) + menu->top += (menu->pagelen - c) * ((menu->current - menu->top) / (menu->pagelen - c)) - c; } } Index: mutt/pattern.c =================================================================== RCS file: /home/roessler/cvs/mutt/pattern.c,v retrieving revision 3.26 retrieving revision 3.27 diff -u -p -r3.26 -r3.27 --- mutt/pattern.c 21 Oct 2005 04:35:37 -0000 3.26 +++ mutt/pattern.c 24 Nov 2005 12:50:27 -0000 3.27 @@ -1202,15 +1202,8 @@ int mutt_pattern_func (int op, char *pro int i; strfcpy (buf, NONULL (Context->pattern), sizeof (buf)); - if (mutt_get_field (prompt, buf, sizeof (buf), M_PATTERN | M_CLEAR) != 0) + if (mutt_get_field (prompt, buf, sizeof (buf), M_PATTERN | M_CLEAR) != 0 || !buf[0]) return (-1); - if (!buf[0]) - { - if (op == M_LIMIT) - strfcpy (buf, "~A", sizeof(buf)); - else - return -1; - } mutt_message _("Compiling search pattern..."); Index: mutt/pgp.c =================================================================== RCS file: /home/roessler/cvs/mutt/pgp.c,v retrieving revision 3.60 retrieving revision 3.61 diff -u -p -r3.60 -r3.61 --- mutt/pgp.c 21 Oct 2005 04:35:37 -0000 3.60 +++ mutt/pgp.c 22 Nov 2005 12:31:58 -0000 3.61 @@ -243,6 +243,7 @@ static void pgp_copy_clearsigned (FILE * int pgp_application_pgp_handler (BODY *m, STATE *s) { + int could_not_decrypt = 0; int needpass = -1, pgp_keyblock = 0; int clearsign = 0, rv, rc; int c = 1; /* silence GCC warning */ @@ -398,15 +399,16 @@ int pgp_application_pgp_handler (BODY *m } if (!clearsign && (!pgpout || c == EOF)) { + could_not_decrypt = 1; + pgp_void_passphrase (); + } + + if (could_not_decrypt && !(s->flags & M_DISPLAY)) + { mutt_error _("Could not decrypt PGP message"); mutt_sleep (1); - pgp_void_passphrase (); - - if (!(s->flags & M_DISPLAY)) - { - rc = -1; - goto out; - } + rc = -1; + goto out; } } @@ -450,7 +452,10 @@ int pgp_application_pgp_handler (BODY *m if (needpass) { state_attach_puts (_("[-- END PGP MESSAGE --]\n"), s); - mutt_message _("PGP message successfully decrypted."); + if (could_not_decrypt) + mutt_error _("Could not decrypt PGP message"); + else + mutt_message _("PGP message successfully decrypted."); } else if (pgp_keyblock) state_attach_puts (_("[-- END PGP PUBLIC KEY BLOCK --]\n"), s);