]> git.eshelyaron.com Git - emacs.git/commitdiff
(redisplay_window): Really switch buffers when
authorGerd Moellmann <gerd@gnu.org>
Mon, 29 May 2000 15:51:23 +0000 (15:51 +0000)
committerGerd Moellmann <gerd@gnu.org>
Mon, 29 May 2000 15:51:23 +0000 (15:51 +0000)
displaying mode lines, and temporarily set selected_frame to the
frame of the window that's redisplayed.

src/xdisp.c

index 0171f963f34cdd029fde5d04fb756f515af50523..78764ebc497f2afd6dc412f50ce1c3b4241dde61 100644 (file)
@@ -9201,7 +9201,20 @@ redisplay_window (window, just_this_one_p)
        && (WINDOW_WANTS_MODELINE_P (w)
           || WINDOW_WANTS_HEADER_LINE_P (w)))
     {
+      Lisp_Object old_selected_frame;
+      
+      old_selected_frame = selected_frame;
+      
+      if (!really_switched_buffer)
+       {
+         set_buffer_temp (old);
+         set_buffer_internal_1 (XBUFFER (w->buffer));
+         really_switched_buffer = 1;
+       }
+      
+      XSETFRAME (selected_frame, f);
       display_mode_lines (w);
+      selected_frame = old_selected_frame;
 
       /* If mode line height has changed, arrange for a thorough
         immediate redisplay using the correct mode line height.  */