notmuch search: Fix missing final newline in "notmuch search --output=tags"

As mentioned in the recent test commits, this also fixes the missing
'[' and ']' characters in the --format=json variant of "notmuch search
--output=tags" as well.
This commit is contained in:
Carl Worth 2010-11-23 17:58:00 -08:00
parent 9e0d00f37e
commit fb4ded1cc9

View file

@ -319,7 +319,9 @@ do_search_tags (const void *ctx,
{
tag = notmuch_tags_get (tags);
if (! first_tag)
if (first_tag)
fputs (format->results_start, stdout);
else
fputs (format->item_sep, stdout);
format->item_id (ctx, "", tag);
@ -332,6 +334,9 @@ do_search_tags (const void *ctx,
if (messages)
notmuch_messages_destroy (messages);
if (! first_tag)
fputs (format->results_end, stdout);
return 0;
}