X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=sbr%2Fseq_del.c;h=97e35783f863607417b6e93e5f4e8793895cd0ab;hb=8e79ce1919d9cf54f101a812e0fd70a33286b9f3;hp=ed70c5d9db74efc7edf4a96b7f2ff53252d25588;hpb=1691e80890e5d8ba258c51c214a3e91880e1db2b;p=mmh diff --git a/sbr/seq_del.c b/sbr/seq_del.c index ed70c5d..97e3578 100644 --- a/sbr/seq_del.c +++ b/sbr/seq_del.c @@ -2,7 +2,9 @@ /* * seq_del.c -- delete message(s) from a sequence * - * $Id$ + * This code is Copyright (c) 2002, by the authors of nmh. See the + * COPYRIGHT file in the root directory of the nmh distribution for + * complete copyright information. */ #include @@ -23,7 +25,8 @@ int seq_delsel (struct msgs *mp, char *cp, int public, int zero) { - int i, msgnum, new_seq = 1; + unsigned int i; + int msgnum, new_seq = 1; if (!seq_nameok (cp)) return 0; @@ -80,6 +83,12 @@ seq_delsel (struct msgs *mp, char *cp, int public, int zero) if (is_selected (mp, msgnum)) clear_sequence (mp, i, msgnum); + if (! strcmp (cp, current) && + mp->lowsel <= mp->curmsg && mp->curmsg <= mp->hghsel) { + /* Removed current message indication, so reset curmsg. */ + mp->curmsg = 0; + } + /* * Set the public/private bit for this sequence. */