From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: Mouse highlighting and fonts Date: Sat, 24 May 2008 22:01:21 -0400 Message-ID: <87hccn9m6m.fsf@stupidchicken.com> References: <878wy1giqs.fsf@stupidchicken.com> <87tzgog5kd.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1211680903 9523 80.91.229.12 (25 May 2008 02:01:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 25 May 2008 02:01:43 +0000 (UTC) To: gerd@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun May 25 04:02:23 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1K05Z1-0005CM-62 for ged-emacs-devel@m.gmane.org; Sun, 25 May 2008 04:02:23 +0200 Original-Received: from localhost ([127.0.0.1]:46329 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K05YG-0007tm-Fh for ged-emacs-devel@m.gmane.org; Sat, 24 May 2008 22:01:36 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K05YC-0007tX-Bw for emacs-devel@gnu.org; Sat, 24 May 2008 22:01:32 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K05YA-0007tK-Tx for emacs-devel@gnu.org; Sat, 24 May 2008 22:01:32 -0400 Original-Received: from [199.232.76.173] (port=52418 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K05YA-0007tH-R2 for emacs-devel@gnu.org; Sat, 24 May 2008 22:01:30 -0400 Original-Received: from c-98-216-111-182.hsd1.ma.comcast.net ([98.216.111.182]:11016 helo=furry) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K05Y7-0000e5-AH; Sat, 24 May 2008 22:01:27 -0400 Original-Received: by furry (Postfix, from userid 1000) id 6CCDBC04D; Sat, 24 May 2008 22:01:21 -0400 (EDT) In-Reply-To: <87tzgog5kd.fsf@stupidchicken.com> (Chong Yidong's message of "Fri, 23 May 2008 15:53:54 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:97681 Archived-At: Chong Yidong 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)