> On Apr 29, 2024, at 9:12 AM, Eli Zaretskii wrote: > >> From: JD Smith >> >> The workaround may be enough for most cases, unless you can't apply an overall 'face for some reason. > > Why would we be unable to apply the box face on characters that are > not actually shown? I guess I should rephrase to "if it's inconvenient to apply an overall face with :box", e.g. if you're adding on the output of another package. There's also of course the need to discover the workaround. >> Any sense why it leaves the vertical bars behind? > > This happens when the glyph under cursor has the beginning-of-box or > end-of-box flag set. When we display the entire stretch of characters > on that line, we (correctly) don't pay attention to these flags in the > middle of the glyph sequence, but redrawing the cursor draws just one > glyph, and knows nothing about those before or after it. So it draws > the unnecessary border, because the glyph under cursor has the flag > set. > > Those box flags are set on the glyphs produced from the display > strings because when we process the beginning or end of the string, we > don't have any idea whether the characters of the underlying buffer > text before/after the string have the same value of the :box face, so > we cannot avoid setting these flags at the first and the last > character of the display string. I see, makes sense. So the cursor blink code would also have to "look ahead/behind" the underlying glyph to know whether to ignore the flag. Probably this is such a rare case that unless there are other related artifacts, it's worth documenting but not fixing.