From 6c924db8677d5231b2ffb7ac89bac25f9f7a6695 Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Wed, 13 Apr 2011 20:35:40 -0400 Subject: [PATCH] Fix problem with empty space when the author field is disabled --- tig.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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); } -- 2.30.2