emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mouse highlighting and fonts


From: Chong Yidong
Subject: Re: Mouse highlighting and fonts
Date: Mon, 26 May 2008 23:26:56 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

Chong Yidong <address@hidden> writes:

> BTW, another mouse-highlighting bug I reported earlier is still present.
> Under certain circumstances, the area to the left and/or right of the
> physical cursor doesn't acquire the proper mouse-face.
>
> This appears to be a long-standing bug, but one that didn't show up
> until the new font code.  That's because it arises as follows: when the
> cursor glyph has a nonzero lbearing or rbearing (i.e., it overlaps with
> its neighbors), the neighboring glyphs are redrawn, and this can
> overwrite the mouse-face highlight.  See xdisp.c:19934.  This didn't
> show up because previously, overlapping glyphs were generally not
> encountered.
>
> I'll try to fix this once I get the time, unless someone else fixes it
> first.

I've checked in a rough fix into CVS.  It turns out that fixing this
properly is non-trivial, due to limitations in the way the glyph-drawing
code.  I think the fix handles most (all?)  situations likely to happen
in practice.  It might lead to incorrect highlighting if a glyph's
overhang is large enough to overlap two or more neighboring glyphs, and
not all those glyphs are mouse-highlighted, but I can't find a test-case
that demonstrates this.

There is a remaining related bug: when the cursor falls inside a
mouse-highlighted block, its foreground is sometimes drawn incorrectly.
I think this is a bug elsewhere in the code, possibly related to the
incorrect drawing of glyphs that I've noticed in other contexts
unrelated to mouse highlighting.  Currently I have no idea what causes
this.

Other than that, if anyone still has problems with mouse highlighting,
please holler.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]