summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d9d43d6)
raw | patch | inline | side by side (parent: d9d43d6)
author | Jonas Fonseca <fonseca@diku.dk> | |
Fri, 4 Apr 2008 09:43:23 +0000 (11:43 +0200) | ||
committer | Jonas Fonseca <fonseca@diku.dk> | |
Fri, 4 Apr 2008 09:43:23 +0000 (11:43 +0200) |
It gives a more pleasant experience when "digging" through commits.
And of course, most commits will have diffs smaller than 1000 lines!?
For the blame view it means less flickering in the startup when the
whole file is read.
And of course, most commits will have diffs smaller than 1000 lines!?
For the blame view it means less flickering in the startup when the
whole file is read.
tig.c | patch | blob | history |
index 6bb5ebb11500c34ed6ebdf948cbe6c0b5b034a59..4dd8245eba0265786ca3b3e5d50d0183de5f2a6b 100644 (file)
--- a/tig.c
+++ b/tig.c
{
static char fmt[] = "%1ld";
char number[10] = " ";
- int max_number = MIN(view->digits, STRING_SIZE(number));
+ int digits3 = view->digits < 3 ? 3 : view->digits;
+ int max_number = MIN(digits3, STRING_SIZE(number));
bool showtrimmed = FALSE;
int col;
lineno += view->offset + 1;
if (lineno == 1 || (lineno % opt_num_interval) == 0) {
if (view->digits <= 9)
- fmt[1] = '0' + view->digits;
+ fmt[1] = '0' + digits3;
if (!string_format(number, fmt, lineno))
number[0] = 0;