fix(help): Consistently calculate PV name length

This commit is contained in:
Ed Page 2023-05-03 20:15:31 -05:00
parent 3963d73e18
commit 1351c56289
2 changed files with 3 additions and 2 deletions

View file

@ -665,7 +665,8 @@ impl<'cmd, 'writer> HelpTemplate<'cmd, 'writer> {
);
let longest = possible_vals
.iter()
.filter_map(|f| f.get_visible_quoted_name().map(|name| display_width(&name)))
.filter(|f| !f.is_hide_set())
.map(|f| display_width(f.get_name()))
.max()
.expect("Only called with possible value");

View file

@ -454,7 +454,7 @@ Options:
--possible-values-with-new-line <possible_values_with_new_line>
Possible values:
- long enough name to trigger new line: Really long enough help message to clearly warrant
- long enough name to trigger new line: Really long enough help message to clearly warrant
wrapping believe me
- second