Handle a newline in a wesmage filter description.

Before it only counted the number of characters causing alignment issues
if there was a newline in the text.
This commit is contained in:
Mark de Wever 2012-03-25 15:23:24 +00:00
parent 05b78c169e
commit 81636a48db

View file

@ -64,7 +64,11 @@ print_option(
}
while(!description.empty()) {
if(description.size() <= description_length) {
size_t eol = description.find('\n');
if(eol <= description_length) {
stream << description.substr(0, eol);
description.erase(0, eol + 1);
} else if(description.size() <= description_length) {
stream << description;
description.clear();
} else {