comparison src/xdisp.c @ 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 94d2751dcb5c
comparison
equal deleted inserted replaced
35388:1ad9046911a2 35389:6fa1f816cb97
3509 from buffer text. */ 3509 from buffer text. */
3510 for (n = newline_found_p = 0; 3510 for (n = newline_found_p = 0;
3511 !newline_found_p && n < MAX_NEWLINE_DISTANCE; 3511 !newline_found_p && n < MAX_NEWLINE_DISTANCE;
3512 n += STRINGP (it->string) ? 0 : 1) 3512 n += STRINGP (it->string) ? 0 : 1)
3513 { 3513 {
3514 get_next_display_element (it); 3514 if (!get_next_display_element (it))
3515 break;
3515 newline_found_p = it->what == IT_CHARACTER && it->c == '\n'; 3516 newline_found_p = it->what == IT_CHARACTER && it->c == '\n';
3516 set_iterator_to_next (it, 0); 3517 set_iterator_to_next (it, 0);
3517 } 3518 }
3518 3519
3519 /* If we didn't find a newline near enough, see if we can use a 3520 /* If we didn't find a newline near enough, see if we can use a