Previously we don't print out ends_line() words at all.
But soon a word might have some content plus a newline at
the end.
So restructure the display to print non-newline characters
from any word.
Note that we cannot have characters *after* a newline.
Doing that would break too much of wiggle's formating
assumptions.
Signed-off-by: NeilBrown <neilb@suse.de>
int highlight_space;
int l;
e = next_melmnt(&pos.p, fm, fb, fa, m);
- if (e.start == NULL ||
- (ends_line(e)
- && visible(mode, m, &pos) != -1))
+ if (!e.start)
break;
+
if (visible(mode, m, &pos) == -1)
continue;
if (e.start[0] == 0)
highlight_space = 1;
for (l = 0; l < e.plen + e.prefix; l++) {
int scol = col;
+ if (*c == '\n')
+ break;
(void)attrset(attr);
if (*c >= ' ' && *c != 0x7f) {
if (highlight_space)
}
c++;
}
+ if ((ends_line(e)
+ && visible(mode, m, &pos) != -1))
+ break;
}
/* We have reached the end of visible line, or end of file */