]> granicus.if.org Git - mutt/commitdiff
Fix various inconsistencies with respect to thread deletion.
authorThomas Roessler <roessler@does-not-exist.org>
Sat, 22 Apr 2000 08:25:20 +0000 (08:25 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Sat, 22 Apr 2000 08:25:20 +0000 (08:25 +0000)
curs_main.c
pager.c

index bf33e25f7911e7ec57cca1f54ebc56c9f4a6e708..7af10d02b15f5791bbbaf6ccc2f46e4d16a309f5 100644 (file)
@@ -1569,6 +1569,9 @@ int mutt_index_menu (void)
 
        if (rc != -1)
        {
+         if (option (OPTDELETEUNTAG))
+           mutt_thread_set_flag (CURHDR, M_TAG, 0, 
+                                 op == OP_DELETE_THREAD ? 0 : 1);
          if (option (OPTRESOLVE))
            if ((menu->current = ci_next_undeleted (menu->current)) == -1)
              menu->current = menu->oldcurrent;
diff --git a/pager.c b/pager.c
index dfd5edacd2d0cfc535e5c075ff043cd89526c655..4ea1770a8f5c8c9b45f2fbec6a03378fe4be98dc 100644 (file)
--- a/pager.c
+++ b/pager.c
@@ -2099,6 +2099,8 @@ mutt_pager (const char *banner, const char *fname, int flags, pager_t *extra)
        CHECK_MODE(IsHeader (extra));
        CHECK_READONLY;
        mutt_set_flag (Context, extra->hdr, M_DELETE, 1);
+        if (option (OPTDELETEUNTAG))
+         mutt_set_flag (Context, extra->hdr, M_TAG, 0);
        redraw = REDRAW_STATUS | REDRAW_INDEX;
        if (option (OPTRESOLVE))
        {
@@ -2117,10 +2119,12 @@ mutt_pager (const char *banner, const char *fname, int flags, pager_t *extra)
 
        if (r != -1)
        {
+         if (option (OPTDELETEUNTAG))
+           mutt_thread_set_flag (extra->hdr, M_TAG, 0,
+                                 ch == OP_DELETE_THREAD ? 0 : 1);
          if (option (OPTRESOLVE))
          {
-           rc = (ch == OP_DELETE_THREAD) ?
-                                 OP_MAIN_NEXT_THREAD : OP_MAIN_NEXT_SUBTHREAD;
+           rc = OP_MAIN_NEXT_UNDELETED;
            ch = -1;
          }