From: Rocco Rutte Date: Sun, 26 Apr 2009 18:44:15 +0000 (+0200) Subject: Sync header to hcache when synching MH/Maildir/IMAP folders. Closes #2942. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e0c461eb594063fb99a1649807d3c6173db93735;p=mutt Sync header to hcache when synching MH/Maildir/IMAP folders. Closes #2942. --- diff --git a/ChangeLog b/ChangeLog index 93bcf048..b4452c4b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2009-04-26 12:00 +0200 Rocco Rutte (addbd9145230) + + * pager.c: Use dynamic buffer for displaying pager lines. Closes + #3162. + + With too small fixed-size buffers we can't color/find certain words + that span buffers. This needs to duplicate mutt_read_line with the + adjustment to leave line termination in and not support breaking + long lines using \ at EOL. Other callers may want to use this one + instead, too as we support \-escaping in too many places. + +2009-04-26 09:52 +0200 Rocco Rutte (1b7f5a7a4f44) + + * ChangeLog, init.h: Document suffixes for %f in $folder_format + 2009-04-22 23:29 +0200 Bertram Felgenhauer (0aa313a3bf20) * headers.c: Fix memory leak in mutt_edit_headers(). Closes #3220. diff --git a/imap/imap.c b/imap/imap.c index f7a207a9..970c0c89 100644 --- a/imap/imap.c +++ b/imap/imap.c @@ -1208,6 +1208,10 @@ int imap_sync_mailbox (CONTEXT* ctx, int expunge, int* index_hint) { h = ctx->hdrs[n]; +#if USE_HCACHE + imap_hcache_put (idata, h); +#endif + if (h->deleted) { imap_cache_del (idata, h); diff --git a/mh.c b/mh.c index e2c5b695..a4abd285 100644 --- a/mh.c +++ b/mh.c @@ -1690,6 +1690,18 @@ int mh_sync_mailbox (CONTEXT * ctx, int *index_hint) goto err; } } + +#if USE_HCACHE + if (ctx->hdrs[i]->changed) + { + if (ctx->magic == M_MAILDIR) + mutt_hcache_store (hc, ctx->hdrs[i]->path + 3, ctx->hdrs[i], + 0, &maildir_hcache_keylen); + else if (ctx->magic == M_MH) + mutt_hcache_store (hc, ctx->hdrs[i]->path, ctx->hdrs[i], 0, strlen); + } +#endif + } #if USE_HCACHE