mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-24 21:50:17 +01:00
cli: print_required_fields() - fix non-ASCII strings alignment in multiline
This commit is contained in:
parent
e6870789b5
commit
7fe4345d0d
1 changed files with 8 additions and 2 deletions
|
|
@ -697,7 +697,10 @@ print_required_fields (NmCli *nmc, const NmcOutputField field_values[])
|
|||
section_prefix ? "." : "",
|
||||
_(field_values[idx].name_l10n),
|
||||
j);
|
||||
printf ("%-*s%s\n", terse ? 0 : ML_VALUE_INDENT, tmp, *p ? *p : not_set_str);
|
||||
width1 = strlen (tmp);
|
||||
width2 = nmc_string_screen_width (tmp, NULL);
|
||||
printf ("%-*s%s\n", terse ? 0 : ML_VALUE_INDENT+width1-width2, tmp,
|
||||
*p ? *p : not_set_str);
|
||||
g_free (tmp);
|
||||
}
|
||||
} else {
|
||||
|
|
@ -709,7 +712,10 @@ print_required_fields (NmCli *nmc, const NmcOutputField field_values[])
|
|||
section_prefix ? hdr_name : "",
|
||||
section_prefix ? "." : "",
|
||||
_(field_values[idx].name_l10n));
|
||||
printf ("%-*s%s\n", terse ? 0 : ML_VALUE_INDENT, tmp, val ? val : not_set_str);
|
||||
width1 = strlen (tmp);
|
||||
width2 = nmc_string_screen_width (tmp, NULL);
|
||||
printf ("%-*s%s\n", terse ? 0 : ML_VALUE_INDENT+width1-width2, tmp,
|
||||
val ? val : not_set_str);
|
||||
g_free (tmp);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue