Commit 35564bea authored by Eli Zaretskii's avatar Eli Zaretskii

Fix face extension past EOL in overlay strings

* src/xdisp.c (face_at_pos): Pass ATTR_FILTER to
* src/xfaces.c (face_for_overlay_string): Accept an additional
argument ATTR_INDEX and pass it to merge_face_ref for merging the
face at POS.  This ensures a face from buffer text will not be
merged unless it specifies the :extend attribute.  (Bug#42552)
* src/dispextern.h (face_for_overlay_string): Adjust prototype.
parent 50ea5b87
Pipeline #6173 failed with stage
in 57 minutes and 50 seconds
......@@ -3538,7 +3538,7 @@ void recompute_basic_faces (struct frame *);
int face_at_buffer_position (struct window *, ptrdiff_t, ptrdiff_t *,
ptrdiff_t, bool, int, enum lface_attribute_index);
int face_for_overlay_string (struct window *, ptrdiff_t, ptrdiff_t *, ptrdiff_t,
bool, Lisp_Object);
bool, Lisp_Object, enum lface_attribute_index);
int face_at_string_position (struct window *, Lisp_Object, ptrdiff_t, ptrdiff_t,
ptrdiff_t *, enum face_id, bool,
enum lface_attribute_index);
......@@ -4339,7 +4339,7 @@ face_at_pos (const struct it *it, enum lface_attribute_index attr_filter)
from_overlay, attr_filter);
......@@ -6475,7 +6475,8 @@ face_at_buffer_position (struct window *w, ptrdiff_t pos,
face_for_overlay_string (struct window *w, ptrdiff_t pos,
ptrdiff_t *endptr, ptrdiff_t limit,
bool mouse, Lisp_Object overlay)
bool mouse, Lisp_Object overlay,
enum lface_attribute_index attr_filter)
struct frame *f = XFRAME (w->frame);
Lisp_Object attrs[LFACE_VECTOR_SIZE];
......@@ -6514,7 +6515,7 @@ face_for_overlay_string (struct window *w, ptrdiff_t pos,
/* Merge in attributes specified via text properties. */
if (!NILP (prop))
merge_face_ref (w, f, prop, attrs, true, NULL, 0);
merge_face_ref (w, f, prop, attrs, true, NULL, attr_filter);
*endptr = endpos;
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