From 1f611003157e9c0192384c0b57f54c525b661b3f Mon Sep 17 00:00:00 2001 From: Ralph Corderoy Date: Sun, 14 Oct 2012 18:59:06 -0500 Subject: [PATCH] Fixed "mark -sequence cur -delete all" to work for cur as well as any other sequence, to allow clearing of the current message indication. --- docs/pending-release-notes | 2 ++ sbr/seq_del.c | 6 ++++++ test/sequences/test-mark | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/docs/pending-release-notes b/docs/pending-release-notes index 7038d93..cf0cdca 100644 --- a/docs/pending-release-notes +++ b/docs/pending-release-notes @@ -70,3 +70,5 @@ BUG FIXES - Removed obsolete BUGS section at end of rcvstore(1) man page [Bug #4361]. - Fixed -nocc me doesn't account for Alternate-Mailboxes [Bug #36635]. - Propagate Mail-Followup-To [Bug #5571]. +- "mark -sequence cur -delete all" now works for cur as well as any + other sequence, to allow clearing of the current message indication. diff --git a/sbr/seq_del.c b/sbr/seq_del.c index 8c353f3..97e3578 100644 --- a/sbr/seq_del.c +++ b/sbr/seq_del.c @@ -83,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. */ diff --git a/test/sequences/test-mark b/test/sequences/test-mark index 96a7e3d..cd3aedf 100755 --- a/test/sequences/test-mark +++ b/test/sequences/test-mark @@ -80,4 +80,8 @@ run_test 'mark -sequence privateseq -list -public' 'privateseq (private): 1-2' folder -create +other > /dev/null run_test 'mark +other -sequence unseen all' 'mark: no messages in other' +# Test removal of indication of cur message. +mark +inbox -sequence cur -delete all +run_test 'pick -nolist cur' 'pick: no cur message' + exit $failed -- 1.7.10.4