]> code.delx.au - gnu-emacs/commitdiff
(redisplay_internal): Only try to hscroll each frame once
authorKim F. Storm <storm@cua.dk>
Mon, 18 Jul 2005 20:59:41 +0000 (20:59 +0000)
committerKim F. Storm <storm@cua.dk>
Mon, 18 Jul 2005 20:59:41 +0000 (20:59 +0000)
to avoid redisplay looping hscrolling back and forth ad infinitum.

src/xdisp.c

index 807cbc2b7933891f20a813fcb2df4687011ebbe1..09cf8a7f5de989a9d1bac7998aebe743fe5ade99 100644 (file)
@@ -10172,6 +10172,16 @@ redisplay_internal (preserve_echo_area)
   ++redisplaying_p;
   specbind (Qinhibit_free_realized_faces, Qnil);
 
+  {
+    Lisp_Object tail, frame;
+
+    FOR_EACH_FRAME (tail, frame)
+      {
+       struct frame *f = XFRAME (frame);
+       f->already_hscrolled_p = 0;
+      }
+  }
+
  retry:
   pause = 0;
   reconsider_clip_changes (w, current_buffer);
@@ -10606,8 +10616,12 @@ redisplay_internal (preserve_echo_area)
              if (FRAME_VISIBLE_P (f) && !FRAME_OBSCURED_P (f))
                {
                  /* See if we have to hscroll.  */
-                 if (hscroll_windows (f->root_window))
-                   goto retry;
+                 if (!f->already_hscrolled_p)
+                   {
+                     f->already_hscrolled_p = 1;
+                     if (hscroll_windows (f->root_window))
+                       goto retry;
+                   }
 
                  /* Prevent various kinds of signals during display
                     update.  stdio is not robust about handling