From 9ab65adbae657727c8162301c6be7cffd7a83a96 Mon Sep 17 00:00:00 2001 From: Rocco Rutte Date: Fri, 17 Apr 2009 15:37:07 +0200 Subject: [PATCH] Make and work in the pager, too. Closes #3212. --- UPDATING | 1 + functions.h | 2 ++ pager.c | 14 ++++++++++++++ 3 files changed, 17 insertions(+) diff --git a/UPDATING b/UPDATING index 28bd489ae..6f0f1994d 100644 --- a/UPDATING +++ b/UPDATING @@ -5,6 +5,7 @@ The keys used are: !: modified feature, -: deleted feature, +: new feature hg tip: + + and work in the pager, too + ~x pattern also matches against In-Reply-To + lower case patterns for string searches perform case-insensitive search as regex patterns do (except IMAP) diff --git a/functions.h b/functions.h index f0add788d..552a0a3f4 100644 --- a/functions.h +++ b/functions.h @@ -183,6 +183,8 @@ struct binding_t OpPager[] = { /* map: pager */ { "delete-message", OP_DELETE, "d" }, { "delete-thread", OP_DELETE_THREAD, "\004" }, { "delete-subthread", OP_DELETE_SUBTHREAD, "\033d" }, + { "set-flag", OP_MAIN_SET_FLAG, "w" }, + { "clear-flag", OP_MAIN_CLEAR_FLAG, "W" }, { "edit", OP_EDIT_MESSAGE, "e" }, { "edit-type", OP_EDIT_TYPE, "\005" }, { "forward-message", OP_FORWARD_MESSAGE, "f" }, diff --git a/pager.c b/pager.c index 7c3f19420..367fc6c98 100644 --- a/pager.c +++ b/pager.c @@ -2289,6 +2289,20 @@ search_next: } break; + case OP_MAIN_SET_FLAG: + case OP_MAIN_CLEAR_FLAG: + CHECK_MODE(IsHeader (extra)); + CHECK_READONLY; + + if (mutt_change_flag (extra->hdr, (ch == OP_MAIN_SET_FLAG)) == 0) + redraw |= REDRAW_STATUS | REDRAW_INDEX; + if (extra->hdr->deleted && option (OPTRESOLVE)) + { + ch = -1; + rc = OP_MAIN_NEXT_UNDELETED; + } + break; + case OP_DELETE_THREAD: case OP_DELETE_SUBTHREAD: CHECK_MODE(IsHeader (extra)); -- 2.40.0