changeset 64478:bb9cda6ee0d1

(redisplay_internal): Only try to hscroll each frame once to avoid redisplay looping hscrolling back and forth ad infinitum.
author Kim F. Storm <storm@cua.dk>
date Mon, 18 Jul 2005 20:59:41 +0000
parents def523ae062b
children 464cbb3faef9
files src/xdisp.c
diffstat 1 files changed, 16 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/xdisp.c	Mon Jul 18 20:59:25 2005 +0000
+++ b/src/xdisp.c	Mon Jul 18 20:59:41 2005 +0000
@@ -10172,6 +10172,16 @@
   ++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 @@
 	      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