mirror of
https://github.com/CLIUtils/CLI11.git
synced 2025-05-01 05:03:52 +00:00
Don't make a new line unless needed
This commit is contained in:
parent
c028ca298d
commit
a58488dc0d
@ -177,9 +177,11 @@ namespace detail {
|
|||||||
void format_help(std::stringstream &out, std::string name, std::string discription, size_t wid) {
|
void format_help(std::stringstream &out, std::string name, std::string discription, size_t wid) {
|
||||||
name = " " + name;
|
name = " " + name;
|
||||||
out << std::setw(wid) << std::left << name;
|
out << std::setw(wid) << std::left << name;
|
||||||
if(name.length()>=wid)
|
if(discription != "") {
|
||||||
out << std::endl << std::setw(wid) << "";
|
if(name.length()>=wid)
|
||||||
out << discription << std::endl;
|
out << std::endl << std::setw(wid) << "";
|
||||||
|
out << discription << std::endl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct Combiner {
|
struct Combiner {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user