Subject: bug#64596: 30.0.50; On FIXME: in src/buffer.c:1481 (force-mode-line-update)

From: Stefan Monnier <[email-masked]>
Date: Sat, 15 Jul 2023 14:15:41 -0400

> Or why redisplay_internal does this:
>
>   consider_all_windows_p = (update_mode_lines
> 			    || windows_or_buffers_changed);

Sorry, I skipped this part in my previous email.
I understand the above code, but I'm not sure what explanation might
be needed so you can understand it as well.  Maybe the problem is the
name `consider_all_windows_p` which suggests that all windows will be
updated, but it only says that we should loop through all the windows to
try and find those which need to be updated.

Would the patch below help?

        Stefan

diff --git a/src/xdisp.c b/src/xdisp.c
index a3464c2c375..385569d9309 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -16491,7 +16491,9 @@ redisplay_internal (void)
   int garbaged_frame_retries = 0;
 
   /* True means redisplay has to consider all windows on all
-     frames.  False, only selected_window is considered.  */
+     frames.  False, only selected_window is considered.
+     If true, the set of windows we try to update is further limited
+     according to the `redisplay` bits in buffers/windows/frames.  */
   bool consider_all_windows_p;
 
   /* True means redisplay has to redisplay the miniwindow.  */