[Top][All Lists]
[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: |
Sat, 24 May 2008 22:01:21 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
Chong Yidong <address@hidden> writes:
> 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.
According to the comments, this code is supposed to redraw glyphs that
are overwritten because of the left/right overhang of the specified
glyph string. But I've never noticed overlapping glyphs in Emacs.
Under what circumstances can overlapping glyphs occur?
In other words, would there be any effect from simply turning off the
overlap-compensation code, as indicated? Anyone know?
(Gerd, do you recall why you wrote this code?)
*** trunk/src/xdisp.c.~1.1213.~ 2008-05-24 18:34:24.000000000 -0400
--- trunk/src/xdisp.c 2008-05-24 21:25:06.000000000 -0400
***************
*** 19928,19933 ****
--- 19928,19934 ----
else
x_reached = x;
+ #if 0
/* If there are any glyphs with lbearing < 0 or rbearing > width in
the row, redraw some glyphs in front or following the glyph
strings built above. */
***************
*** 20015,20020 ****
--- 20016,20022 ----
s->clip_tail = clip_tail;
}
}
+ #endif
/* Draw all strings. */
for (s = head; s; s = s->next)