[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/extend_face_id cc2554a 4/5: Fixed extend face filt
From: |
Jimmy Aguilar Mena |
Subject: |
[Emacs-diffs] scratch/extend_face_id cc2554a 4/5: Fixed extend face filtered for prop. |
Date: |
Mon, 9 Sep 2019 10:51:46 -0400 (EDT) |
branch: scratch/extend_face_id
commit cc2554acafd1d559361941e692cd48322e9c3327
Author: Jimmy Aguilar Mena <address@hidden>
Commit: Jimmy Aguilar Mena <address@hidden>
Fixed extend face filtered for prop.
---
src/xdisp.c | 13 ++++---------
src/xfaces.c | 4 ++--
2 files changed, 6 insertions(+), 11 deletions(-)
diff --git a/src/xdisp.c b/src/xdisp.c
index 9fb4f6b..c7fadec 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -4106,17 +4106,12 @@ handle_fontified_prop (struct it *it)
***********************************************************************/
static enum prop_handled
-handle_face_prop_general (struct it *it,
+handle_face_prop_general (struct it *it, int *face_id_ptr,
enum lface_attribute_index attr_filter)
{
- int new_face_id, *face_id_ptr;
+ int new_face_id;
ptrdiff_t next_stop;
- if (attr_filter == LFACE_EXTEND_INDEX)
- face_id_ptr = &(it->extend_face_id);
- else
- face_id_ptr = &(it->face_id);
-
if (!STRINGP (it->string))
{
new_face_id
@@ -4270,7 +4265,7 @@ handle_face_prop_general (struct it *it,
static enum prop_handled
handle_face_prop (struct it *it)
{
- return handle_face_prop_general (it, 0);
+ return handle_face_prop_general (it, &(it->face_id), 0);
}
@@ -20496,7 +20491,7 @@ extend_face_to_end_of_line (struct it *it)
|| WINDOW_RIGHT_MARGIN_WIDTH (it->w) > 0))
return;
- handle_face_prop_general (it, LFACE_EXTEND_INDEX);
+ handle_face_prop_general (it, &(it->extend_face_id), LFACE_EXTEND_INDEX);
/* Face extension extends the background and box of IT->extend_face_id
to the end of the line. If the background equals the background
diff --git a/src/xfaces.c b/src/xfaces.c
index 7c5a085..4b3f2b2 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -6129,11 +6129,11 @@ face_at_buffer_position (struct window *w, ptrdiff_t
pos,
}
/* Begin with attributes from the default face. */
- memcpy (attrs, default_face->lface, sizeof attrs);
+ memcpy (attrs, default_face->lface, sizeof(attrs));
/* 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);
/* Now merge the overlay data. */
noverlays = sort_overlays (overlay_vec, noverlays, w);