# HG changeset patch # User Kim F. Storm # Date 1108508685 0 # Node ID 8decd369825fb646b8ab0175b1665bc4fead7571 # Parent 0764705c7e034ff8b3b7805007d987245902dcb7 (BUFFER_POS_REACHED_P): Return true if pos reached and at end of display vector. diff -r 0764705c7e03 -r 8decd369825f src/xdisp.c --- a/src/xdisp.c Tue Feb 15 23:04:21 2005 +0000 +++ b/src/xdisp.c Tue Feb 15 23:04:45 2005 +0000 @@ -5819,11 +5819,14 @@ saved_glyph_row = it->glyph_row; it->glyph_row = NULL; -#define BUFFER_POS_REACHED_P() \ - ((op & MOVE_TO_POS) != 0 \ - && BUFFERP (it->object) \ - && IT_CHARPOS (*it) >= to_charpos \ - && it->method == next_element_from_buffer) +#define BUFFER_POS_REACHED_P() \ + ((op & MOVE_TO_POS) != 0 \ + && BUFFERP (it->object) \ + && IT_CHARPOS (*it) >= to_charpos \ + && (it->method == next_element_from_buffer || \ + (it->method == next_element_from_display_vector && \ + it->dpvec + it->current.dpvec_index + 1 >= it->dpend))) + while (1) {