changeset 35389:6fa1f816cb97

(forward_to_next_line_start): Stop at end of buffer when searching for a newline.
author Gerd Moellmann <gerd@gnu.org>
date Thu, 18 Jan 2001 12:26:54 +0000
parents 1ad9046911a2
children 06059a467fc2
files src/xdisp.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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);
     }