Commit a804f964 authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

argp: fix handling of very long options in --help

* lib/argp-help.c (hol_entry_help): Handle cases with option
description is larger than RMARGIN.
parent 31fd3143
......@@ -1186,7 +1186,11 @@ hol_entry_help (struct hol_entry *entry, const struct argp_state *state,
__argp_fmtstream_set_lmargin (stream, uparams.opt_doc_col);
__argp_fmtstream_set_wmargin (stream, uparams.opt_doc_col);
if (col > (unsigned int) (uparams.opt_doc_col + 3))
/* Put the description on a new line if it cannot start
within 3 columns of OPT_DOC_COL. Note that if the option
specification went past RMARGIN, then COL has been reset
to 0. */
if (col > (unsigned int) (uparams.opt_doc_col + 3) || col == 0)
__argp_fmtstream_putc (stream, '\n');
else if (col >= (unsigned int) uparams.opt_doc_col)
__argp_fmtstream_puts (stream, " ");
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment