Backlighting and Visible Whitespace
Joerg Fischer
jf505 at gmx.de
Wed Sep 26 16:54:04 CEST 2007
Tony Balinski wrote:
> if (lineIndex >= lineLen)
> style = FILL_MASK;
> if (styleBuf != NULL) { /* ---------------- NOTE: NO ELSE */
> /* pick up styleBuf's style value separately */
> int styleChar = (unsigned char)BufGetCharacter(styleBuf, pos);
> if (styleChar == textD->unfinishedStyle) {
> /* encountered "unfinished" style, trigger parsing */
> (textD->unfinishedHighlightCB)(textD, pos, textD->highlightCBArg);
> styleChar = (unsigned char)BufGetCharacter(styleBuf, pos);
> }
> style |= styleChar; /* add styleBuf value found to style bitmap */
> }
Just four lines changed a little! Nice trick, thanks.
> No Xlib required!
>
> Now the question: why?
Because it was/is all there? One 'only' needs to understand how it
works, which I didn't.
Btw, I think the answers to whether SH background coloring should be
implemented like this back then missed that nothing is lost. If one
likes the style to stop before the newline, simply use $ versus \n in
the regex pattern for the style.
Jörg
More information about the Develop
mailing list