summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2017-01-28 18:48:08 -0800
committerKevin McCarthy <kevin@8t8.us>2017-01-28 18:48:08 -0800
commit9ae62494d8315234b48618301bc88d31b65f297e (patch)
treeda7d55f61f98f947171cb676f1d0295e04c847d7 /main.c
parentf58e89c8466b36d11ecabddc8baf9727f59e6d69 (diff)
Improve the label completion hash table usage.
Move the hash table inside the Context. Hook message arrival/deletion to update the label hash. Change the label hash to strdup keys. Use hash_find_elem when updating the counter, to reduce unnecessary add/delete operations.
Diffstat (limited to 'main.c')
-rw-r--r--main.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/main.c b/main.c
index bc46d610..cafb830d 100644
--- a/main.c
+++ b/main.c
@@ -1240,16 +1240,12 @@ int main (int argc, char **argv, char **environ)
if((Context = mx_open_mailbox (folder, ((flags & MUTT_RO) || option (OPTREADONLY)) ? MUTT_READONLY : 0, NULL))
|| !explicit_folder)
{
- Labels = hash_create (131, 0);
- mutt_scan_labels(Context);
#ifdef USE_SIDEBAR
mutt_sb_set_open_buffy ();
#endif
mutt_index_menu ();
if (Context)
FREE (&Context);
- if (Labels)
- hash_destroy(&Labels, NULL);
}
#ifdef USE_IMAP
imap_logout_all ();