Commit 823564e5 authored by Eli Zaretskii's avatar Eli Zaretskii
Browse files

Avoid a crash in mouse-highlight of Speedbar frames.

 src/xfaces.c (face_at_buffer_position): Avoid repeated evaluation of
 face ID by FACE_FROM_ID, and avoid a crash when mouse is moved
 from an Org mode buffer to a Speedbar frame.
parent 54a1215b
2011-08-19 Eli Zaretskii <eliz@gnu.org>
* xfaces.c (face_at_buffer_position): Avoid repeated evaluation of
face ID by FACE_FROM_ID, and avoid a crash when mouse is moved
from an Org mode buffer to a Speedbar frame.
* xdisp.c (RECORD_MAX_MIN_POS): If the display element comes from
a composition, take its buffer position from IT->cmp_it.charpos.
Fixes cursor positioning at the beginning of a line that begins
......
......@@ -6008,9 +6008,18 @@ face_at_buffer_position (struct window *w, EMACS_INT pos,
*endptr = endpos;
default_face = FACE_FROM_ID (f, base_face_id >= 0 ? base_face_id
: NILP (Vface_remapping_alist) ? DEFAULT_FACE_ID
: lookup_basic_face (f, DEFAULT_FACE_ID));
{
int face_id;
if (base_face_id >= 0)
face_id = base_face_id;
else if (NILP (Vface_remapping_alist))
face_id = DEFAULT_FACE_ID;
else
face_id = lookup_basic_face (f, DEFAULT_FACE_ID);
default_face = FACE_FROM_ID (f, face_id);
}
/* Optimize common cases where we can use the default face. */
if (noverlays == 0
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment