# HG changeset patch # User Gerd Moellmann # Date 978549541 0 # Node ID e02de3bdd3496c2e26310205d1be045c821bad24 # Parent d95d24e2e8a399b8f87bd730f7b854ff7ead097e (forward_to_next_line_start): Reset it->c if taking the short cut at the start of the function. Add an assertion. (reseat_at_next_visible_line_start): Add an assertion. diff -r d95d24e2e8a3 -r e02de3bdd349 src/xdisp.c --- a/src/xdisp.c Wed Jan 03 16:30:36 2001 +0000 +++ b/src/xdisp.c Wed Jan 03 19:19:01 2001 +0000 @@ -3494,6 +3494,7 @@ if (it->what == IT_CHARACTER && it->c == '\n') { set_iterator_to_next (it, 0); + it->c = 0; return 1; } @@ -3553,6 +3554,7 @@ } it->selective = old_selective; + xassert (!newline_found_p || FETCH_BYTE (IT_BYTEPOS (*it) - 1) == '\n'); return newline_found_p; } @@ -3642,9 +3644,12 @@ more than the value of IT->selective. */ if (it->selective > 0) while (IT_CHARPOS (*it) < ZV - && indented_beyond_p (IT_CHARPOS (*it), IT_BYTEPOS (*it), + && indented_beyond_p (IT_CHARPOS (*it), IT_BYTEPOS (*it), it->selective)) - newline_found_p = forward_to_next_line_start (it, &skipped_p); + { + xassert (FETCH_BYTE (IT_BYTEPOS (*it) - 1) == '\n'); + newline_found_p = forward_to_next_line_start (it, &skipped_p); + } /* Position on the newline if that's what's requested. */ if (on_newline_p && newline_found_p)