NCurses: fix unneeded last line when displaying info box

This commit is contained in:
Maxime Coste 2013-02-26 18:53:29 +01:00
parent 0f413607c2
commit b68cc3cd3c

View File

@ -398,6 +398,10 @@ static DisplayCoord compute_needed_size(const String& str)
{
if (*begin == '\n')
{
// ignore last '\n', no need to show an empty line
if (begin+1 == end)
break;
res.column = std::max(res.column, line_len+1);
line_len = 0;
++res.line;