From 366fedec453f87ef524cdc4cd38b733587457f07 Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Sun, 15 Feb 2009 18:23:44 +0100 Subject: [PATCH] Fix draw_lineno to always set the static format buffer --- tig.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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; } -- 2.30.2