From: Jonas Fonseca Date: Thu, 14 Apr 2011 00:35:40 +0000 (-0400) Subject: Fix problem with empty space when the author field is disabled X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=6c924db8677d5231b2ffb7ac89bac25f9f7a6695;p=tig.git Fix problem with empty space when the author field is disabled --- diff --git a/tig.c b/tig.c index dd9437f..2049789 100644 --- a/tig.c +++ b/tig.c @@ -187,7 +187,7 @@ mkauthor(const char *text, int cols, enum author author) bool trim = author_trim(cols); bool abbreviate = author == AUTHOR_ABBREVIATED || !trim; - if (!author) + if (author == AUTHOR_NO) return ""; if (abbreviate && text) return get_author_initials(text); @@ -1651,6 +1651,9 @@ draw_author(struct view *view, const char *author) bool trim = author_trim(opt_author_cols); const char *text = mkauthor(author, opt_author_cols, opt_author); + if (opt_author == AUTHOR_NO) + return FALSE; + return draw_field(view, LINE_AUTHOR, text, opt_author_cols, trim); }