From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#54450: 29.0.50; redisplay--pre-redisplay-functions issue Date: Fri, 18 Mar 2022 19:01:06 +0200 Message-ID: <83sfrffb59.fsf@gnu.org> References: <87pmmjw9ru.fsf.ref@aol.com> <87pmmjw9ru.fsf@aol.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26166"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 54450@debbugs.gnu.org To: Ergus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Mar 18 18:02:16 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 1nVFzT-0006XE-Jz for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 18 Mar 2022 18:02:15 +0100 Original-Received: from localhost ([::1]:36272 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nVFzS-0007Fw-C0 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 18 Mar 2022 13:02:14 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:42594) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nVFzG-0007FS-4z for bug-gnu-emacs@gnu.org; Fri, 18 Mar 2022 13:02:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36122) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nVFzF-0005dR-SE for bug-gnu-emacs@gnu.org; Fri, 18 Mar 2022 13:02:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nVFzF-0004Wh-Q9 for bug-gnu-emacs@gnu.org; Fri, 18 Mar 2022 13:02:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 Mar 2022 17:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54450 X-GNU-PR-Package: emacs Original-Received: via spool by 54450-submit@debbugs.gnu.org id=B54450.164762287615198 (code B ref 54450); Fri, 18 Mar 2022 17:02:01 +0000 Original-Received: (at 54450) by debbugs.gnu.org; 18 Mar 2022 17:01:16 +0000 Original-Received: from localhost ([127.0.0.1]:58252 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nVFyV-0003wq-OF for submit@debbugs.gnu.org; Fri, 18 Mar 2022 13:01:16 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:36710) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nVFyU-0003qx-Bb for 54450@debbugs.gnu.org; Fri, 18 Mar 2022 13:01:14 -0400 Original-Received: from [2001:470:142:3::e] (port=52200 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nVFyO-0005Tb-OD; Fri, 18 Mar 2022 13:01:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=pbCDAWbyF8/Cms4AaDWW+b2BrRBE/2g8kaSmPei2tYg=; b=C6ybxe2PLQJH VWUOK2ryC0R8BpuaIa7DRTqQCUuvvbnnu4+PBrSu3r4t5OBikNff43l1TxFdcCfbmXUTJHTlg0lK5 wHR0wPBMNfxz7Mm165+o/dSihdtQB1XwXElnGU1zCEiulr77MSqRlwq/Fycsj7nFysZmoOZM2XOXb VJXWn8sy0ltIomXM32hDhoBcs1CJ+OijGCRzGgVYz3VREIk3g9yYx8ZkcmaCU5OODtcSeN2ZZA/J3 gTvyHWVNHhkNvk+qMa7OrIE1XXhuhHalKDYcdDOcSoYE6IzqIp9oeRWqpXcTwie4SrhpuCeIeebSV qLnw8xDOBEFRK8gIUy1rGQ==; Original-Received: from [87.69.77.57] (port=3384 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nVFyO-0004Sm-5z; Fri, 18 Mar 2022 13:01:08 -0400 In-Reply-To: <87pmmjw9ru.fsf@aol.com> (bug-gnu-emacs@gnu.org) 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:228562 Archived-At: > Date: Fri, 18 Mar 2022 16:38:45 +0100 > From: Ergus via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > emacs -Q > (setq highlight-nonselected-windows t) > > C-x 2 > C-x o > C-x C-f /tmp/test > (insert some text) > C-a C-SPC C-f C-f C-f > C-x o > > [at this point we should see a region highlighted over the 3 first > letters of the inserted text in the other winfow buffer (test)] > > then eval this several times: > > (with-selected-window (get-buffer-window "test" 0) > (right-char)) > > This will move the point in the test window, but the region won't be > updated. Thanks. Does the patch below solve the problem? diff --git a/src/intervals.c b/src/intervals.c index 687b237..cbcc100 100644 --- a/src/intervals.c +++ b/src/intervals.c @@ -44,6 +44,7 @@ #include "lisp.h" #include "intervals.h" #include "buffer.h" +#include "window.h" #include "puresize.h" #include "keymap.h" @@ -1885,6 +1886,11 @@ set_point_both (ptrdiff_t charpos, ptrdiff_t bytepos) return; } + if (highlight_nonselected_windows + && !NILP (Vtransient_mark_mode) + && !NILP (BVAR (current_buffer, mark_active))) + bset_redisplay (current_buffer); + /* Set TO to the interval containing the char after CHARPOS, and TOPREV to the interval containing the char before CHARPOS. Either one may be null. They may be equal. */