changeset 32585:bf84251f474b

(forward_to_next_line_start): Switch iterator's handling of selective display off while searching for the next line start.
author Gerd Moellmann <gerd@gnu.org>
date Tue, 17 Oct 2000 14:07:44 +0000
parents 6c986070499e
children 40cebc20f02c
files src/xdisp.c
diffstat 1 files changed, 12 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/xdisp.c	Tue Oct 17 12:59:41 2000 +0000
+++ b/src/xdisp.c	Tue Oct 17 14:07:44 2000 +0000
@@ -3267,9 +3267,15 @@
      struct it *it;
      int *skipped_p;
 {
-  int newline_found_p, n;
+  int old_selective, newline_found_p, n;
   const int MAX_NEWLINE_DISTANCE = 500;
 
+  /* Don't handle selective display in the following.  It's (a)
+     unnecessary and (b) leads to an infinite recursion because
+     next_element_from_ellipsis indirectly calls this function.  */
+  old_selective = it->selective;
+  it->selective = 0;
+
   /* Scan for a newline within MAX_NEWLINE_DISTANCE display elements
      from buffer text.  */
   n = newline_found_p = 0;
@@ -3318,6 +3324,7 @@
 	}
     }
 
+  it->selective = old_selective;
   return newline_found_p;
 }
 
@@ -4147,7 +4154,10 @@
 	}
     }
   else
-    reseat_at_next_visible_line_start (it, 1);
+    {
+      it->method = next_element_from_buffer;
+      reseat_at_next_visible_line_start (it, 1);
+    }
   
   return get_next_display_element (it);
 }