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:
parent
05b78c169e
commit
81636a48db
1 changed files with 5 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue