Mercurial > emacs
comparison src/xdisp.c @ 25242:28067247ff90
(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.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Wed, 11 Aug 1999 11:50:20 +0000 |
parents | fbe149852f1c |
children | d74ff22998b4 |
comparison
equal
deleted
inserted
replaced
25241:35674d7c4136 | 25242:28067247ff90 |
---|---|
1989 face_id = FACE_FOR_CHARSET (it->f, face_id, charset); | 1989 face_id = FACE_FOR_CHARSET (it->f, face_id, charset); |
1990 } | 1990 } |
1991 } | 1991 } |
1992 else | 1992 else |
1993 { | 1993 { |
1994 if ((IT_CHARPOS (*it) >= ZV && !before_p) | |
1995 || (IT_CHARPOS (*it) <= BEGV && before_p)) | |
1996 return it->face_id; | |
1997 | |
1994 limit = IT_CHARPOS (*it) + TEXT_PROP_DISTANCE_LIMIT; | 1998 limit = IT_CHARPOS (*it) + TEXT_PROP_DISTANCE_LIMIT; |
1995 pos = it->current.pos; | 1999 pos = it->current.pos; |
1996 | 2000 |
1997 if (before_p) | 2001 if (before_p) |
1998 DEC_TEXT_POS (pos); | 2002 DEC_TEXT_POS (pos); |
1999 else | 2003 else |
2000 INC_TEXT_POS (pos); | 2004 INC_TEXT_POS (pos); |
2001 | 2005 |
2002 /* Determine face for CHARSET_ASCII, or unibyte. */ | 2006 /* Determine face for CHARSET_ASCII, or unibyte. */ |
2003 face_id = face_at_buffer_position (it->w, | 2007 face_id = face_at_buffer_position (it->w, |
2004 CHARPOS (pos), | 2008 CHARPOS (pos), |
2005 it->region_beg_charpos, | 2009 it->region_beg_charpos, |
2006 it->region_end_charpos, | 2010 it->region_end_charpos, |