Nico Golde:
[apps/madmutt.git] / mx.c
diff --git a/mx.c b/mx.c
index ed779b2..e45fda3 100644 (file)
--- a/mx.c
+++ b/mx.c
  *     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  */ 
 
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
+
 #include "mutt.h"
 #include "mx.h"
 #include "rfc2047.h"
@@ -1305,6 +1309,8 @@ int mx_sync_mailbox (CONTEXT *ctx, int *index_hint)
         ctx->deleted = 0;
       }
     }
+    else if (ctx->last_tag && ctx->last_tag->deleted)
+      ctx->last_tag = NULL; /* reset last tagged msg now useless */
   }
 
   /* really only for IMAP - imap_sync_mailbox results in a call to