# HG changeset patch # User Gerd Moellmann # Date 979820814 0 # Node ID 6fa1f816cb97e664ea39b72c5b66ac59c0eee26c # Parent 1ad9046911a24c042fa698a59e06e0f7e41eb5e6 (forward_to_next_line_start): Stop at end of buffer when searching for a newline. diff -r 1ad9046911a2 -r 6fa1f816cb97 src/xdisp.c --- a/src/xdisp.c Thu Jan 18 12:14:48 2001 +0000 +++ b/src/xdisp.c Thu Jan 18 12:26:54 2001 +0000 @@ -3511,7 +3511,8 @@ !newline_found_p && n < MAX_NEWLINE_DISTANCE; n += STRINGP (it->string) ? 0 : 1) { - get_next_display_element (it); + if (!get_next_display_element (it)) + break; newline_found_p = it->what == IT_CHARACTER && it->c == '\n'; set_iterator_to_next (it, 0); }