mirror of
https://github.com/clap-rs/clap
synced 2025-03-04 15:27:16 +00:00
fix(help): Consistently calculate PV name length
This commit is contained in:
parent
3963d73e18
commit
1351c56289
2 changed files with 3 additions and 2 deletions
|
@ -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");
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue