Do not allow '\n' in display lines, replace with a space

This commit is contained in:
Maxime Coste 2015-09-20 11:23:10 +01:00
parent 574e337132
commit b3e0e27d1f

View File

@ -296,6 +296,13 @@ DisplayLine parse_display_line(StringView line, Face default_face)
else
was_antislash = true;
}
if (c == '\n') // line breaks are forbidden, replace with space
{
content += StringView{pos, it+1};
content.back() = ' ';
pos = it + 1;
was_antislash = false;
}
}
content += StringView{pos, line.end()};
if (not content.empty())