From unknown Fri Aug 15 16:18:55 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#19353 <19353@debbugs.gnu.org> To: bug#19353 <19353@debbugs.gnu.org> Subject: Status: 25.0.50; Lazy Highlighting Reply-To: bug#19353 <19353@debbugs.gnu.org> Date: Fri, 15 Aug 2025 23:18:55 +0000 retitle 19353 25.0.50; Lazy Highlighting reassign 19353 emacs submitter 19353 Dani Moncayo severity 19353 minor thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 11 16:12:29 2014 Received: (at submit) by debbugs.gnu.org; 11 Dec 2014 21:12:29 +0000 Received: from localhost ([127.0.0.1]:43268 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XzB2D-0006uA-9Y for submit@debbugs.gnu.org; Thu, 11 Dec 2014 16:12:29 -0500 Received: from eggs.gnu.org ([208.118.235.92]:51344) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XzB2B-0006tv-Bc for submit@debbugs.gnu.org; Thu, 11 Dec 2014 16:12:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XzB25-0001rV-95 for submit@debbugs.gnu.org; Thu, 11 Dec 2014 16:12:22 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:54916) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XzB25-0001rR-6n for submit@debbugs.gnu.org; Thu, 11 Dec 2014 16:12:21 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53065) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XzB24-0005g4-5x for bug-gnu-emacs@gnu.org; Thu, 11 Dec 2014 16:12:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XzB1y-0001qJ-AD for bug-gnu-emacs@gnu.org; Thu, 11 Dec 2014 16:12:20 -0500 Received: from mail-ob0-x22e.google.com ([2607:f8b0:4003:c01::22e]:47888) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XzB1y-0001q7-43 for bug-gnu-emacs@gnu.org; Thu, 11 Dec 2014 16:12:14 -0500 Received: by mail-ob0-f174.google.com with SMTP id nt9so5494070obb.5 for ; Thu, 11 Dec 2014 13:12:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=GlybLLHRajMTOPPAc+50JAINCzvO+bA2VI8ezkI+Jak=; b=phkC2g68xlcNryMg+T2JMqE3exEdWL4EaCTvIjYPnNXY1eLIFzHLI9NVTjWwoglgVR 6k/auJl9kI62zZ3J98VOCGEUTlDTOJmjzn1jPu01KMfwosba4MuuBC3OB8v6uvmH1AIf WxhEBGho2mqus85qx7EG4sz4hpcCgj04THd4neFj05O/cJG7XC0uCfEdhoo+xRAxt2W5 KdOp5d0Q05Foc57bt+XPWIdeDhVTNH4fg6Y7M6k1cekBBn7ilx06925MUDnXKrYuGj3J D7YapsUkmGxovVeiXa2uhpIftbdYoN4Cw7GoboO+wn2lpAKtcrctxaGSXHlZluf8Z7D7 jX1A== MIME-Version: 1.0 X-Received: by 10.202.207.194 with SMTP id f185mr3129826oig.1.1418332332893; Thu, 11 Dec 2014 13:12:12 -0800 (PST) Received: by 10.60.47.84 with HTTP; Thu, 11 Dec 2014 13:12:12 -0800 (PST) Date: Thu, 11 Dec 2014 22:12:12 +0100 Message-ID: Subject: 25.0.50; Lazy Highlighting From: Dani Moncayo To: bug-gnu-emacs Content-Type: text/plain; charset=UTF-8 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) Recipe: 0. emacs -Q 1. Create and empty buffer. 2. Write there this text (without the hyphen lines): -------------- fat cat path too book cool -------------- 3. Place point just after the "a" in "path". 4. Type: C-s a t Here, the "at" in "path" is not highlighted at all. Wrong: it should be lazy-highlighted because it's one match of the current search string, that can be reached by repeating "C-s". This bug becomes more obvious if you type "C-s" several times at this moment. 5. Place point just after the first "o" in "cool". 6. Type: C-s o o This second scenario is similar: the "oo" in "cool" should be lazy-highlighted, because it's a match. Well, in this case the second "o" in "cool" cannot be (and is not) lazy-highlighted because it's the current (partial) match, and the Isearch face must take precedence over the lazy-highlighting. But still, the first "o" in "cool" should be lazy-highlighted. Now type another "C-s", and you will see: * The "oo" in "too" highlighted as the current match (correct). * The "oo" in "book" lazy-highlighted (correct). * The "oo" in "cool" not highlighted (wrong: should be lazy-highlighted). In GNU Emacs 25.0.50.1 (i686-pc-mingw32) of 2014-11-30 on LEG570 Repository revision: 3517da701ea5d16c296745d6678988b06bee615d Windowing system distributor `Microsoft Corp.', version 6.3.9600 Configured using: `configure --without-dbus --enable-checking=yes,glyphs CPPFLAGS=-DGLYPH_DEBUG=1' -- Dani Moncayo From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 11 19:28:21 2014 Received: (at 19353) by debbugs.gnu.org; 12 Dec 2014 00:28:21 +0000 Received: from localhost ([127.0.0.1]:43331 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XzE5l-0003Q1-1A for submit@debbugs.gnu.org; Thu, 11 Dec 2014 19:28:21 -0500 Received: from ps18281.dreamhost.com ([69.163.222.226]:38587 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XzE5i-0003Ps-82 for 19353@debbugs.gnu.org; Thu, 11 Dec 2014 19:28:18 -0500 Received: from localhost.linkov.net (ps18281.dreamhostps.com [69.163.222.226]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 6CFBA348328E73; Thu, 11 Dec 2014 16:28:15 -0800 (PST) From: Juri Linkov To: Dani Moncayo Subject: Re: bug#19353: 25.0.50; Lazy Highlighting Organization: LINKOV.NET References: Date: Fri, 12 Dec 2014 02:18:10 +0200 In-Reply-To: (Dani Moncayo's message of "Thu, 11 Dec 2014 22:12:12 +0100") Message-ID: <87k31x20id.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 19353 Cc: 19353@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) > Recipe: > 0. emacs -Q > 1. Create and empty buffer. > 2. Write there this text (without the hyphen lines): > -------------- > fat cat path > too book cool > -------------- > 3. Place point just after the "a" in "path". > 4. Type: C-s a t > 5. Place point just after the first "o" in "cool". > 6. Type: C-s o o Does this patch address all your test cases? It prolongs the boundary of the wrapped search by the length of the search string, and in the worst case it might lazy-highlight some matches twice. diff --git a/lisp/isearch.el b/lisp/isearch.el index c3e473a..5fb687b 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -3063,11 +3063,13 @@ (defun isearch-lazy-highlight-search () (bound (if isearch-lazy-highlight-forward (min (or isearch-lazy-highlight-end-limit (point-max)) (if isearch-lazy-highlight-wrapped - isearch-lazy-highlight-start + (+ isearch-lazy-highlight-start + (1- (length isearch-lazy-highlight-last-string))) (window-end))) (max (or isearch-lazy-highlight-start-limit (point-min)) (if isearch-lazy-highlight-wrapped - isearch-lazy-highlight-end + (- isearch-lazy-highlight-end + (1- (length isearch-lazy-highlight-last-string))) (window-start)))))) ;; Use a loop like in `isearch-search'. (while retry From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 12 02:55:19 2014 Received: (at 19353) by debbugs.gnu.org; 12 Dec 2014 07:55:19 +0000 Received: from localhost ([127.0.0.1]:43477 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XzL4I-0000bX-Ow for submit@debbugs.gnu.org; Fri, 12 Dec 2014 02:55:18 -0500 Received: from mail-oi0-f51.google.com ([209.85.218.51]:37832) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XzL4G-0000bK-4J for 19353@debbugs.gnu.org; Fri, 12 Dec 2014 02:55:16 -0500 Received: by mail-oi0-f51.google.com with SMTP id e131so4922957oig.10 for <19353@debbugs.gnu.org>; Thu, 11 Dec 2014 23:55:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=AfvOPg+QuiGu0d+1xQF589PJvK85XQY/L6iNaBAE0oI=; b=bhUlkhjM2JVYxIigibiycxgiZH6Kc5+SpzehsHpiqyu5CklKqhXZFGj2OrfJVREyNB h6DHAAHUyciB4Ee8N41Jcarz4J81brZY5ASSp+xxZdoNslFyXbtJ/ycfsxfktiiSYjZo VWLqLgrARk0BdhND5X7Teg5ZsTFLhFKUE6l5/9kL1Fuxru2h33uRSlc+nBktVHIU2Vi1 dUwhBfRuXDTlIf2IDlFHuOOkh4KkTHWBcQd+/Ra6vOwmfoia2yTP0/4ZRYePNnZKJ7E1 TaLnJQQSTPtXhaqXYmyiIkI3UgtMkWcHjwGirzBR7E7Ju/cgXGJzwvSLvE6VpvkwrxWh wBDA== MIME-Version: 1.0 X-Received: by 10.202.46.196 with SMTP id u187mr8666248oiu.19.1418370910410; Thu, 11 Dec 2014 23:55:10 -0800 (PST) Received: by 10.60.47.84 with HTTP; Thu, 11 Dec 2014 23:55:10 -0800 (PST) In-Reply-To: <87k31x20id.fsf@mail.linkov.net> References: <87k31x20id.fsf@mail.linkov.net> Date: Fri, 12 Dec 2014 08:55:10 +0100 Message-ID: Subject: Re: bug#19353: 25.0.50; Lazy Highlighting From: Dani Moncayo To: Juri Linkov Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 19353 Cc: 19353@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) > Does this patch address all your test cases? Yes Juri, it does. Thank you. -- Dani Moncayo From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 15 18:46:00 2014 Received: (at 19353-done) by debbugs.gnu.org; 15 Dec 2014 23:46:00 +0000 Received: from localhost ([127.0.0.1]:47279 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y0fKy-00037E-2m for submit@debbugs.gnu.org; Mon, 15 Dec 2014 18:46:00 -0500 Received: from ps18281.dreamhost.com ([69.163.222.226]:41022 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y0fKv-000375-Qz for 19353-done@debbugs.gnu.org; Mon, 15 Dec 2014 18:45:58 -0500 Received: from localhost.linkov.net (ps18281.dreamhostps.com [69.163.222.226]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 7DD57348328E73; Mon, 15 Dec 2014 15:45:54 -0800 (PST) From: Juri Linkov To: Dani Moncayo Subject: Re: bug#19353: 25.0.50; Lazy Highlighting Organization: LINKOV.NET References: <87k31x20id.fsf@mail.linkov.net> Date: Tue, 16 Dec 2014 01:45:28 +0200 In-Reply-To: (Dani Moncayo's message of "Fri, 12 Dec 2014 08:55:10 +0100") Message-ID: <874msw4gvb.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 19353-done Cc: 19353-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Now the patch is committed, thank you for the suggestion. From unknown Fri Aug 15 16:18:55 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 13 Jan 2015 12:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator