diff --git a/src/ViewTask.cpp b/src/ViewTask.cpp index 929023024..4861a4c60 100644 --- a/src/ViewTask.cpp +++ b/src/ViewTask.cpp @@ -208,7 +208,6 @@ std::string ViewTask::render (std::vector & data, std::vector & seque // Not enough for minimum. else if (overage < 0) { - context.error (format (STRING_VIEW_TOO_SMALL, sum_minimal + all_extra, _width)); widths = minimal; } @@ -313,10 +312,11 @@ std::string ViewTask::render (std::vector & data, std::vector & seque row_color.blend (rule_color); } + const int off = overage < 0 ? overage : 0; for (unsigned int c = 0; c < _columns.size (); ++c) { cells.push_back (std::vector ()); - _columns[c]->render (cells[c], data[sequence[s]], widths[c], row_color); + _columns[c]->render (cells[c], data[sequence[s]], widths[c]+off, row_color); if (cells[c].size () > max_lines) max_lines = cells[c].size (); diff --git a/src/text.cpp b/src/text.cpp index f5e3496be..884013ae9 100644 --- a/src/text.cpp +++ b/src/text.cpp @@ -54,7 +54,8 @@ void wrapText ( { std::string line; unsigned int offset = 0; - while (extractLine (line, text, width, hyphenate, offset)) + const int dw = width < 12 ? 12 : width; + while (extractLine (line, text, dw, hyphenate, offset)) lines.push_back (line); }