emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-28 e059d7c156: Fix region highlight in non-selected windows


From: Eli Zaretskii
Subject: emacs-28 e059d7c156: Fix region highlight in non-selected windows
Date: Sat, 19 Mar 2022 03:21:06 -0400 (EDT)

branch: emacs-28
commit e059d7c156edb37a7c836906b9a3510adee3d543
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    Fix region highlight in non-selected windows
    
    * src/xdisp.c (prepare_menu_bars): Include in the windows passed
    to pre-redisplay-functions windows whose point was moved from the
    last recorded position.  (Bug#54450)
---
 src/xdisp.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/xdisp.c b/src/xdisp.c
index 3f283d6732..44f2536880 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -12825,9 +12825,12 @@ prepare_menu_bars (void)
            {
              Lisp_Object this = XCAR (ws);
              struct window *w = XWINDOW (this);
+             /* Cf. conditions for redisplaying a window at the
+                beginning of redisplay_window.  */
              if (w->redisplay
                  || XFRAME (w->frame)->redisplay
-                 || XBUFFER (w->contents)->text->redisplay)
+                 || XBUFFER (w->contents)->text->redisplay
+                 || BUF_PT (XBUFFER (w->contents)) != w->last_point)
                {
                  windows = Fcons (this, windows);
                }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]