From 54918e2b47ffcb64fcce348a977a45e33d7a9760 Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Tue, 17 Oct 2000 14:08:06 +0000 Subject: [PATCH] (forward_to_next_line_start): Switch iterator's handling of selective display off while searching for the next line start. --- src/ChangeLog | 5 +++++ src/xdisp.c | 14 ++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 2a3f16d986d..a4a943fe747 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2000-10-17 Gerd Moellmann + + * xdisp.c (forward_to_next_line_start): Switch iterator's handling + of selective display off while searching for the next line start. + 2000-10-17 Kenichi Handa * Makefile.in (term.o): Depend on dispextern.h. diff --git a/src/xdisp.c b/src/xdisp.c index 9b6d3806444..e9723f5272c 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -3267,9 +3267,15 @@ forward_to_next_line_start (it, skipped_p) 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 @@ forward_to_next_line_start (it, skipped_p) } } + it->selective = old_selective; return newline_found_p; } @@ -4147,7 +4154,10 @@ next_element_from_ellipsis (it) } } 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); } -- 2.39.2