From: Gerd Moellmann Date: Wed, 11 Aug 1999 11:50:20 +0000 (+0000) Subject: (face_before_or_after_it_pos): If position after X-Git-Tag: emacs-pretest-21.0.90~7199 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7085174642ca97284ae7dabaf20d501f93ae88b2;p=emacs.git (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 --git a/src/xdisp.c b/src/xdisp.c index 28a6299836a..ed5b22c8797 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -1991,6 +1991,10 @@ face_before_or_after_it_pos (it, before_p) } 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 @@ face_before_or_after_it_pos (it, before_p) 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),