From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs Subject: bug#9149: 24.0.50; regression on mouse-face for completions Date: Fri, 22 Jul 2011 07:56:56 -0700 Message-ID: <5AD5B9D01FE74B009E3E5697483A6E47@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1311346699 13633 80.91.229.12 (22 Jul 2011 14:58:19 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 22 Jul 2011 14:58:19 +0000 (UTC) To: 9149@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 22 16:58:15 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QkHB1-0003p3-S9 for geb-bug-gnu-emacs@m.gmane.org; Fri, 22 Jul 2011 16:58:08 +0200 Original-Received: from localhost ([::1]:42014 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QkHB1-0002TY-Hg for geb-bug-gnu-emacs@m.gmane.org; Fri, 22 Jul 2011 10:58:07 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:46502) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QkHAx-0002T4-TT for bug-gnu-emacs@gnu.org; Fri, 22 Jul 2011 10:58:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QkHAw-00049I-LD for bug-gnu-emacs@gnu.org; Fri, 22 Jul 2011 10:58:03 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43675) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QkHAw-00049E-IN for bug-gnu-emacs@gnu.org; Fri, 22 Jul 2011 10:58:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1QkHAw-0002qG-AS; Fri, 22 Jul 2011 10:58:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 22 Jul 2011 14:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 9149 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: Original-Received: via spool by submit@debbugs.gnu.org id=B.131134663810872 (code B ref -1); Fri, 22 Jul 2011 14:58:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 22 Jul 2011 14:57:18 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QkHAE-0002pJ-Cn for submit@debbugs.gnu.org; Fri, 22 Jul 2011 10:57:18 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QkHAC-0002p7-Cz for submit@debbugs.gnu.org; Fri, 22 Jul 2011 10:57:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QkHA6-0003uS-K4 for submit@debbugs.gnu.org; Fri, 22 Jul 2011 10:57:11 -0400 Original-Received: from lists.gnu.org ([140.186.70.17]:38939) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QkHA6-0003uO-IZ for submit@debbugs.gnu.org; Fri, 22 Jul 2011 10:57:10 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:46078) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QkHA5-0002ND-JA for bug-gnu-emacs@gnu.org; Fri, 22 Jul 2011 10:57:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QkHA4-0003th-A4 for bug-gnu-emacs@gnu.org; Fri, 22 Jul 2011 10:57:09 -0400 Original-Received: from rcsinet15.oracle.com ([148.87.113.117]:26212) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QkHA4-0003rU-45 for bug-gnu-emacs@gnu.org; Fri, 22 Jul 2011 10:57:08 -0400 Original-Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by rcsinet15.oracle.com (Switch-3.4.4/Switch-3.4.4) with ESMTP id p6MEv2tY008659 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 22 Jul 2011 14:57:04 GMT Original-Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id p6MEv1ed029085 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 22 Jul 2011 14:57:02 GMT Original-Received: from abhmt117.oracle.com (abhmt117.oracle.com [141.146.116.69]) by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id p6MEuusn011999 for ; Fri, 22 Jul 2011 09:56:56 -0500 Original-Received: from dradamslap1 (/10.159.44.149) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 22 Jul 2011 07:56:56 -0700 X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6109 Thread-Index: AcxIf5mYlH1BlsxCTp616omd3wbDEg== X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090202.4E298FC1.000C:SCFMA922111,ss=1,re=-4.000,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 22 Jul 2011 10:58:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:49560 Archived-At: This bug seems to have been introduced between the published Windows builds of 2010-10-19 (no bug) and 2010-10-25 (bug). I tried to examine changes made to the sources during that week, but didn't see anything super obvious as the cause. What might have introduced the bug was this change (just a guess): Eli Zaretskii2010-10-23 15:30:45(101157.1.16 test) Revision ID: eliz@gnu.org-20101023153045-9zcud9tw7y2p7b3a Implement mouse highlight for bidi-reordered lines. xdisp.c (fast_find_string_pos): #ifdef away, not used anymore. (mouse_face_from_string_pos): New function, replaces fast_find_string_pos. (note_mouse_highlight): Call it instead of fast_find_string_pos. (note_mode_line_or_margin_highlight): Support bidi-reordered strings and R2L glyph rows. Fix comments. (note_mouse_highlight): When bidi reordering is turned on in a buffer, call next-single-property-change and previous-single-property-change with last argument nil. Clear mouse highlight when mouse pointer is in a R2L row on the stretch glyph that stands for no text beyond the line end. (row_containing_pos): Don't return too early when CHARPOS is in a bidi-reordered continued line. Return immediately when the first hit is found in a line that is not continued, or when an exact match for CHARPOS is found. (rows_from_pos_range): New function. (mouse_face_from_buffer_pos): Use it instead of calling row_containing_pos for START_CHARPOS and END_CHARPOS. Rewrite the function to support mouse highlight in bidi-reordered lines and not to assume that START_CHARPOS is always in mouse_face_beg_row. If necessary, swap mouse_face_beg_row and mouse_face_end_row so that the former is always above the latter or identical to it. (show_mouse_face): Support drawing highlighted R2L lines. (coords_in_mouse_face_p): New function, bidi-aware. (cursor_in_mouse_face_p, note_mouse_highlight, erase_phys_cursor): Call it instead of comparing with mouse-face members of dpyinfo. (note_mode_line_or_margin_highlight): Fix confusingly swapped usage of hpos and vpos. files modified: src/ChangeLog src/xdisp.c The bug is that the `mouse-face' highlighting is not applied to an entire completion candidate, if that candidate is multiline and it contains an empty line. What happens is that the `mouse-face' highlighting stops as soon as the empty line (i.e., \n$) is encountered. The rest of the text of the candidate does not have the `mouse-face' highlighting. Here's a recipe to reproduce the problem: emacs -Q Evaluate this code: (setq foo '(("abcdefgh ijklmn opqrst uvwxyz abcde") ("123456 7890123 45678 9012345 678901 23456"))) (completing-read "ff: " foo) When you evaluate the `completing-read' call, move the mouse pointer over the two candidates in *Completions*. Each candidate should be completely `mouse-face' highlighted, but is not. The highlighting of each candidate stops as soon as the first blank line within the candidate is encountered. In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600) of 2011-07-18 on 3249CTO Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (4.5) --no-opt --cflags -Ic:/build/include'