wt-status: lift the artificual "at least 20 columns" floor
When we show unmerged paths, we had an artificial 20 columns floor for the width of labels (e.g. "both deleted:") shown next to the pathnames. Depending on the locale, this may result in a label that is too wide when all the label strings are way shorter than 20 columns, or no-op when a label string is longer than 20 columns. Just drop the artificial floor. The screen real estate is better utilized this way when all the strings are shorter. Adjust the tests to this change. Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
8f17f5b22a
commit
c7cb333f60
@ -318,8 +318,6 @@ static void wt_status_print_unmerged_data(struct wt_status *s,
|
||||
if (!padding) {
|
||||
label_width = maxwidth(wt_status_unmerged_status_string, 1, 7);
|
||||
label_width += strlen(" ");
|
||||
if (label_width < 20)
|
||||
label_width = 20;
|
||||
padding = xmallocz(label_width);
|
||||
memset(padding, ' ', label_width);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user