Wrap: change indent atom to be a replaced empty buffer range

Avoid confusing the column highlighters.
This commit is contained in:
Maxime Coste 2017-11-02 11:08:03 +08:00
parent fd95af0e3e
commit 730e5725e9

View File

@ -700,7 +700,10 @@ struct WrapHighlighter : Highlighter
line.erase(atom_it, line.end());
if (indent != 0)
new_line.insert(new_line.begin(), DisplayAtom{String{' ', indent}});
{
auto it = new_line.insert(new_line.begin(), {buffer, coord, coord});
it->replace(String{' ', indent});
}
if (it+1 - display_buffer.lines().begin() == win_height)
{