From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#58479: 29.0.50; [feature/noverlay] Displaced overlays in notmuch search buffers after refreshing Date: Fri, 14 Oct 2022 16:30:03 -0400 Message-ID: References: <87zge0tqkt.fsf@localhost> <87pmewqrj3.fsf@rfc20.org> <87bkqfype2.fsf@localhost> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29701"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Matt Armstrong , 58479@debbugs.gnu.org To: Ihor Radchenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 14 22:32:27 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ojRM2-0007Vh-Qx for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 14 Oct 2022 22:32:27 +0200 Original-Received: from localhost ([::1]:34932 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ojRM1-0003aP-EV for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 14 Oct 2022 16:32:25 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50414) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ojRKg-0003Pg-Fw for bug-gnu-emacs@gnu.org; Fri, 14 Oct 2022 16:31:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39667) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ojRKg-0007fs-8J for bug-gnu-emacs@gnu.org; Fri, 14 Oct 2022 16:31:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ojRKg-0007BA-27 for bug-gnu-emacs@gnu.org; Fri, 14 Oct 2022 16:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Oct 2022 20:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58479 X-GNU-PR-Package: emacs Original-Received: via spool by 58479-submit@debbugs.gnu.org id=B58479.166577941627497 (code B ref 58479); Fri, 14 Oct 2022 20:31:02 +0000 Original-Received: (at 58479) by debbugs.gnu.org; 14 Oct 2022 20:30:16 +0000 Original-Received: from localhost ([127.0.0.1]:38740 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojRJv-00079R-Ne for submit@debbugs.gnu.org; Fri, 14 Oct 2022 16:30:15 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:57889) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojRJt-000799-Dv for 58479@debbugs.gnu.org; Fri, 14 Oct 2022 16:30:14 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id A090810012E; Fri, 14 Oct 2022 16:30:07 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 1B11E100098; Fri, 14 Oct 2022 16:30:06 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1665779406; bh=ktWnDUjEXobB7DX6j/BkYY8Zh8lVn5FcMVrcEV810ys=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=QLFy/jqxcCmKNmUv35Pi5/AmZbE07yriZ8uxbD87VVsq5gyRuYZSRzfAcNfQ5V/sW YsSYZa9+yE+5VJyH1X5vaVPQauSYrbXRrgofghxZbdBIQHokIrQ7Mz9DeMlfzfyaCk 8+uvlJVEDsYYvue1zXJ+BZUXBjeGcCnzj6wKRIOgofGjGzIQ1vgMyBytqv2M6CemRm 5URwjQ38tCubGYpx2l6wQp6Gr8oMOl16HBjVDKB8KhY9rCEOzKxdA6lkDit1IkjuPw KNbSw0WnOfLp2mLOf/v1DVcH6ogHelpv6UQE5S/k65OT/khUgKmN0WX6GfLcXR1arP YJRd8RmJ0E+Zg== Original-Received: from pastel (65-110-220-202.cpe.pppoe.ca [65.110.220.202]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id DDF52120EEC; Fri, 14 Oct 2022 16:30:05 -0400 (EDT) In-Reply-To: <87bkqfype2.fsf@localhost> (Ihor Radchenko's message of "Fri, 14 Oct 2022 12:56:21 +0800") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:245485 Archived-At: > What I see is: > > 1. M-x my-b58479 > 2. Hell...rld! > > M-x my-dump-overlays > > Buffer # has 2 overlays. > > # > (window # face hl-line priority -50) > > # > (invisible ellipsis) > > 3. C-d (5 times) > 4. Hell... > > "rld!" disappears! Thanks, I have fixed this specific problem with the patch below. Let's hope it also fixes your original issue with notmuch. Stefan diff --git a/src/textprop.c b/src/textprop.c index 04fae528097..b34246f5bc7 100644 --- a/src/textprop.c +++ b/src/textprop.c @@ -649,7 +649,8 @@ get_char_property_and_overlay (Lisp_Object position, register Lisp_Object prop, Lisp_Object tem = Foverlay_get (node->data, prop); struct sortvec *this; - if (NILP (tem) || (w && ! overlay_matches_window (w, node->data))) + if (NILP (tem) || node->end < pos + 1 + || (w && ! overlay_matches_window (w, node->data))) continue; this = (result == items ? items + 1 : items);