aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJimmy Aguilar Mena2019-09-08 14:41:31 +0200
committerJimmy Aguilar Mena2019-10-14 14:18:40 +0200
commitb5cd6871c0b9ba4443793217c2f9a63423a6e58d (patch)
treea12dd6458bbf0ad38edc7aa4810478a338c185f3 /src
parentfaa9b06b486c2d87c304bc006d20604f9f937a40 (diff)
downloademacs-b5cd6871c0b9ba4443793217c2f9a63423a6e58d.tar.gz
emacs-b5cd6871c0b9ba4443793217c2f9a63423a6e58d.zip
Fixed extend face filtered for prop.
* src/xfaces.c (face_at_buffer_position): Pass ATTR_FILTER to merge_face_ref in when !NILP (prop).
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c13
-rw-r--r--src/xfaces.c4
2 files changed, 6 insertions, 11 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 518d823ca9a..ee1a089af59 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -4149,17 +4149,12 @@ handle_fontified_prop (struct it *it)
4149 ***********************************************************************/ 4149 ***********************************************************************/
4150 4150
4151static enum prop_handled 4151static enum prop_handled
4152handle_face_prop_general (struct it *it, 4152handle_face_prop_general (struct it *it, int *face_id_ptr,
4153 enum lface_attribute_index attr_filter) 4153 enum lface_attribute_index attr_filter)
4154{ 4154{
4155 int new_face_id, *face_id_ptr; 4155 int new_face_id;
4156 ptrdiff_t next_stop; 4156 ptrdiff_t next_stop;
4157 4157
4158 if (attr_filter == LFACE_EXTEND_INDEX)
4159 face_id_ptr = &(it->extend_face_id);
4160 else
4161 face_id_ptr = &(it->face_id);
4162
4163 if (!STRINGP (it->string)) 4158 if (!STRINGP (it->string))
4164 { 4159 {
4165 new_face_id 4160 new_face_id
@@ -4313,7 +4308,7 @@ handle_face_prop_general (struct it *it,
4313static enum prop_handled 4308static enum prop_handled
4314handle_face_prop (struct it *it) 4309handle_face_prop (struct it *it)
4315{ 4310{
4316 return handle_face_prop_general (it, 0); 4311 return handle_face_prop_general (it, &(it->face_id), 0);
4317} 4312}
4318 4313
4319 4314
@@ -21598,7 +21593,7 @@ extend_face_to_end_of_line (struct it *it)
21598 || WINDOW_RIGHT_MARGIN_WIDTH (it->w) > 0)) 21593 || WINDOW_RIGHT_MARGIN_WIDTH (it->w) > 0))
21599 return; 21594 return;
21600 21595
21601 handle_face_prop_general (it, LFACE_EXTEND_INDEX); 21596 handle_face_prop_general (it, &(it->extend_face_id), LFACE_EXTEND_INDEX);
21602 21597
21603 /* Face extension extends the background and box of IT->extend_face_id 21598 /* Face extension extends the background and box of IT->extend_face_id
21604 to the end of the line. If the background equals the background 21599 to the end of the line. If the background equals the background
diff --git a/src/xfaces.c b/src/xfaces.c
index 189ba1e7678..d3851d03342 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -6133,11 +6133,11 @@ face_at_buffer_position (struct window *w, ptrdiff_t pos,
6133 } 6133 }
6134 6134
6135 /* Begin with attributes from the default face. */ 6135 /* Begin with attributes from the default face. */
6136 memcpy (attrs, default_face->lface, sizeof attrs); 6136 memcpy (attrs, default_face->lface, sizeof(attrs));
6137 6137
6138 /* Merge in attributes specified via text properties. */ 6138 /* Merge in attributes specified via text properties. */
6139 if (!NILP (prop)) 6139 if (!NILP (prop))
6140 merge_face_ref (w, f, prop, attrs, true, NULL, 0); 6140 merge_face_ref (w, f, prop, attrs, true, NULL, attr_filter);
6141 6141
6142 /* Now merge the overlay data. */ 6142 /* Now merge the overlay data. */
6143 noverlays = sort_overlays (overlay_vec, noverlays, w); 6143 noverlays = sort_overlays (overlay_vec, noverlays, w);