mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-06 03:40:56 -08:00
(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.
This commit is contained in:
parent
a38634ff1f
commit
7085174642
1 changed files with 5 additions and 1 deletions
|
|
@ -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),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue