# HG changeset patch # User Gerd Moellmann # Date 934372220 0 # Node ID 28067247ff9048b8d33e9b4bb56f5b9bf6571cf0 # Parent 35674d7c4136b75a9291e4a52c90dc5dbf3af169 (face_before_or_after_it_pos): If position after or before iterator's current position in the buffer is out of bounds, return the iterator's original face id. diff -r 35674d7c4136 -r 28067247ff90 src/xdisp.c --- a/src/xdisp.c Wed Aug 11 10:47:38 1999 +0000 +++ b/src/xdisp.c Wed Aug 11 11:50:20 1999 +0000 @@ -1991,6 +1991,10 @@ } else { + if ((IT_CHARPOS (*it) >= ZV && !before_p) + || (IT_CHARPOS (*it) <= BEGV && before_p)) + return it->face_id; + limit = IT_CHARPOS (*it) + TEXT_PROP_DISTANCE_LIMIT; pos = it->current.pos; @@ -1998,7 +2002,7 @@ DEC_TEXT_POS (pos); else INC_TEXT_POS (pos); - + /* Determine face for CHARSET_ASCII, or unibyte. */ face_id = face_at_buffer_position (it->w, CHARPOS (pos),