Avoid a risky corner case with invalid face ids.
* src/xdisp.c (handle_stop): Avoid assigning -1 to it->face_id here, as that creates a dangerous corner case.
This commit is contained in:
parent
d4bd55e7ae
commit
afd83bd152
2 changed files with 7 additions and 1 deletions
|
@ -1,5 +1,8 @@
|
|||
2012-02-12 Chong Yidong <cyd@gnu.org>
|
||||
|
||||
* xdisp.c (handle_stop): Avoid assigning -1 to it->face_id here,
|
||||
as that creates a dangerous corner case.
|
||||
|
||||
* window.c (Fdelete_window_internal): Invalidate the mouse
|
||||
highlight (Bug#9904).
|
||||
|
||||
|
|
|
@ -2750,9 +2750,12 @@ init_iterator (struct it *it, struct window *w,
|
|||
if (charpos >= BUF_BEG (current_buffer))
|
||||
{
|
||||
it->end_charpos = ZV;
|
||||
it->face_id = -1;
|
||||
IT_CHARPOS (*it) = charpos;
|
||||
|
||||
/* We will rely on `reseat' to set this up properly, via
|
||||
handle_face_prop. */
|
||||
it->face_id = it->base_face_id;
|
||||
|
||||
/* Compute byte position if not specified. */
|
||||
if (bytepos < charpos)
|
||||
IT_BYTEPOS (*it) = CHAR_TO_BYTE (charpos);
|
||||
|
|
Loading…
Add table
Reference in a new issue