1
0
mirror of https://github.com/CLIUtils/CLI11.git synced 2025-04-30 20:53:52 +00:00

Don't make a new line unless needed

This commit is contained in:
Henry Fredrick Schreiner 2017-02-04 14:48:57 -05:00
parent c028ca298d
commit a58488dc0d

View File

@ -177,10 +177,12 @@ namespace detail {
void format_help(std::stringstream &out, std::string name, std::string discription, size_t wid) {
name = " " + name;
out << std::setw(wid) << std::left << name;
if(discription != "") {
if(name.length()>=wid)
out << std::endl << std::setw(wid) << "";
out << discription << std::endl;
}
}
struct Combiner {
int num;