From: Karel Zak Date: Sun, 23 Sep 2012 07:31:54 +0000 (+0200) Subject: reuse connection in complete_all_nm_tags() X-Git-Tag: neomutt-20160404~13^2~37 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=46d6055b035244da89e0d58f5558a2ef80378dea;p=neomutt reuse connection in complete_all_nm_tags() Signed-off-by: Karel Zak --- diff --git a/init.c b/init.c index edce02670..f2455b3cb 100644 --- a/init.c +++ b/init.c @@ -2660,9 +2660,11 @@ static int complete_all_nm_tags (const char *pt) memset (Matches, 0, Matches_listsize); memset (Completed, 0, sizeof (Completed)); + nm_longrun_init(Context, FALSE); + /* Work out how many tags there are. */ if (nm_get_all_tags(Context, NULL, &tag_count_1) || tag_count_1 == 0) - return 0; + goto done; /* Free the old list, if any. */ if (nm_tags != NULL) { @@ -2680,6 +2682,7 @@ static int complete_all_nm_tags (const char *pt) tag_count_1 != tag_count_2) { FREE (&nm_tags); nm_tags = NULL; + nm_longrun_done(Context); return -1; } @@ -2690,6 +2693,9 @@ static int complete_all_nm_tags (const char *pt) matches_ensure_morespace (Num_matched); Matches[Num_matched++] = User_typed; + +done: + nm_longrun_done(Context); return 0; }