diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2018-05-11 14:13:29 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-05-13 10:45:05 +0900 |
commit | b5d5a567fbc1eda911f91a8c78731028065bbed8 (patch) | |
tree | 768b6880337cd554114ae4a67a27809550f6e396 /builtin/column.c | |
parent | pager: set COLUMNS to term_columns() (diff) | |
download | tgif-b5d5a567fbc1eda911f91a8c78731028065bbed8.tar.xz |
column: fix off-by-one default width
By default we want to fill the whole screen if possible, but we do not
want to use up _all_ terminal columns because the last character is
going hit the border, push the cursor over and wrap. Keep it at
default value zero, which will make print_columns() set the width at
term_columns() - 1.
This affects the test in t7004 because effective column width before
was 40 but now 39 so we need to compensate it by one or the output at
39 columns has a different layout.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/column.c')
-rw-r--r-- | builtin/column.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/builtin/column.c b/builtin/column.c index 0c3223d64b..5228ccf37a 100644 --- a/builtin/column.c +++ b/builtin/column.c @@ -42,7 +42,6 @@ int cmd_column(int argc, const char **argv, const char *prefix) git_config(column_config, NULL); memset(&copts, 0, sizeof(copts)); - copts.width = term_columns(); copts.padding = 1; argc = parse_options(argc, argv, "", options, builtin_column_usage, 0); if (argc) |