Do not try to split non range atoms in column highlighter

That means we wont have a very nice interaction between show_whitespaces
and column highlighters, but thats the simplest fix for now, if we want
a better behaviour we need to introduce a way to know that a replaced
range is splittable (meaning it means to have the same amount of columns
as the range it replaces)

Fixes #1275
This commit is contained in:
Maxime Coste 2017-04-19 21:15:36 +01:00
parent 0d8b850bc3
commit bee2180da7
4 changed files with 4 additions and 1 deletions

View File

@ -573,7 +573,7 @@ HighlighterAndId create_column_highlighter(HighlighterParameters params)
{ {
for (auto atom_it = line.begin(); atom_it != line.end(); ++atom_it) for (auto atom_it = line.begin(); atom_it != line.end(); ++atom_it)
{ {
if (!atom_it->has_buffer_range()) if (atom_it->type() != DisplayAtom::Range)
continue; continue;
kak_assert(atom_it->begin().line == buf_line); kak_assert(atom_it->begin().line == buf_line);

View File

@ -0,0 +1 @@
:addhl show_whitespaces<ret>i<space><esc>:addhl column 1 red<ret>A<backspace><esc>

View File

@ -0,0 +1 @@

View File

@ -0,0 +1 @@