Highlighting spaces is very noisy and doesn't help very much.
We only really need to differentiate spaces from tabs and highlighting
tabs is enough for that.
We continue to highlight spaces that are adjacent to tabs, but not
other spaces.
Signed-off-by: NeilBrown <neilb@suse.de>
highlight_space = 0;
attr = visible(mode, m, &pos);
if ((attr == a_unmatched || attr == a_extra) &&
- changed &&
- (*c == ' ' || *c == '\t'))
- highlight_space = 1;
+ changed)
+ /* Only highlight spaces if there is a tab nearby */
+ for (l = 0; l < e.plen + e.prefix; l++)
+ if (c[l] == '\t')
+ highlight_space = 1;
for (l = 0; l < e.plen + e.prefix; l++) {
int scol = col;
if (*c == '\n')