diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 6 |
1 files changed, 5 insertions, 1 deletions
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) | |||
| 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 | ||
| @@ -1998,7 +2002,7 @@ face_before_or_after_it_pos (it, 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), |