]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix region highlight in non-selected windows
authorEli Zaretskii <eliz@gnu.org>
Sat, 19 Mar 2022 07:19:53 +0000 (09:19 +0200)
committerEli Zaretskii <eliz@gnu.org>
Sat, 19 Mar 2022 07:19:53 +0000 (09:19 +0200)
* 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

index 3f283d6732a6382a1d23f76af57cf1d0ae5bb1bc..44f2536880b816b2dd4bc53cefa65b572bc819a2 100644 (file)
@@ -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);
                }