From: Jonas Fonseca Date: Sun, 15 Feb 2009 17:23:44 +0000 (+0100) Subject: Fix draw_lineno to always set the static format buffer X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=366fedec453f87ef524cdc4cd38b733587457f07;p=tig.git Fix draw_lineno to always set the static format buffer --- diff --git a/tig.c b/tig.c index 725ace0..b9d7a63 100644 --- a/tig.c +++ b/tig.c @@ -2032,9 +2032,7 @@ draw_lineno(struct view *view, unsigned int lineno) if (lineno == 1 || (lineno % opt_num_interval) == 0) { static char fmt[] = "%1ld"; - if (view->digits <= 9) - fmt[1] = '0' + digits3; - + fmt[1] = '0' + (view->digits <= 9 ? digits3 : 1); if (string_format(number, fmt, lineno)) text = number; }