diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/dispextern.h | 7 | ||||
| -rw-r--r-- | src/xdisp.c | 23 |
2 files changed, 13 insertions, 17 deletions
diff --git a/src/dispextern.h b/src/dispextern.h index 8bbabbe30dc..0615b16d712 100644 --- a/src/dispextern.h +++ b/src/dispextern.h | |||
| @@ -2374,7 +2374,7 @@ struct it | |||
| 2374 | /* Face id of the iterator saved in case a glyph from dpvec contains | 2374 | /* Face id of the iterator saved in case a glyph from dpvec contains |
| 2375 | a face. The face is restored when all glyphs from dpvec have | 2375 | a face. The face is restored when all glyphs from dpvec have |
| 2376 | been delivered. */ | 2376 | been delivered. */ |
| 2377 | int saved_face_id, saved_extend_face_id; | 2377 | int saved_face_id; |
| 2378 | 2378 | ||
| 2379 | /* Vector of glyphs for control character translation. The pointer | 2379 | /* Vector of glyphs for control character translation. The pointer |
| 2380 | dpvec is set to ctl_chars when a control character is translated. | 2380 | dpvec is set to ctl_chars when a control character is translated. |
| @@ -2436,7 +2436,7 @@ struct it | |||
| 2436 | ptrdiff_t prev_stop; | 2436 | ptrdiff_t prev_stop; |
| 2437 | ptrdiff_t base_level_stop; | 2437 | ptrdiff_t base_level_stop; |
| 2438 | struct composition_it cmp_it; | 2438 | struct composition_it cmp_it; |
| 2439 | int face_id, extend_face_id; | 2439 | int face_id; |
| 2440 | 2440 | ||
| 2441 | /* Save values specific to a given method. */ | 2441 | /* Save values specific to a given method. */ |
| 2442 | union { | 2442 | union { |
| @@ -2494,9 +2494,6 @@ struct it | |||
| 2494 | /* Face to use. */ | 2494 | /* Face to use. */ |
| 2495 | int face_id; | 2495 | int face_id; |
| 2496 | 2496 | ||
| 2497 | /* Face to extend at EOL/ */ | ||
| 2498 | int extend_face_id; | ||
| 2499 | |||
| 2500 | /* Setting of buffer-local variable selective-display-ellipses. */ | 2497 | /* Setting of buffer-local variable selective-display-ellipses. */ |
| 2501 | bool_bf selective_display_ellipsis_p : 1; | 2498 | bool_bf selective_display_ellipsis_p : 1; |
| 2502 | 2499 | ||
diff --git a/src/xdisp.c b/src/xdisp.c index 5ed63234093..5f7799e5b63 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -4158,8 +4158,7 @@ handle_fontified_prop (struct it *it) | |||
| 4158 | ***********************************************************************/ | 4158 | ***********************************************************************/ |
| 4159 | 4159 | ||
| 4160 | static int | 4160 | static int |
| 4161 | handle_face_prop_general (struct it *it, int initial_face_id, | 4161 | face_at_pos (struct it *it, enum lface_attribute_index attr_filter) |
| 4162 | enum lface_attribute_index attr_filter) | ||
| 4163 | { | 4162 | { |
| 4164 | int new_face_id; | 4163 | int new_face_id; |
| 4165 | ptrdiff_t next_stop; | 4164 | ptrdiff_t next_stop; |
| @@ -4263,13 +4262,13 @@ handle_face_prop_general (struct it *it, int initial_face_id, | |||
| 4263 | face will not change until limit, i.e. if the new face has a | 4262 | face will not change until limit, i.e. if the new face has a |
| 4264 | box, all characters up to limit will have one. But, as | 4263 | box, all characters up to limit will have one. But, as |
| 4265 | usual, we don't know whether limit is really the end. */ | 4264 | usual, we don't know whether limit is really the end. */ |
| 4266 | if (new_face_id != initial_face_id) | 4265 | if (new_face_id != it->face_id) |
| 4267 | { | 4266 | { |
| 4268 | struct face *new_face = FACE_FROM_ID (it->f, new_face_id); | 4267 | struct face *new_face = FACE_FROM_ID (it->f, new_face_id); |
| 4269 | /* If it->face_id is -1, old_face below will be NULL, see | 4268 | /* If it->face_id is -1, old_face below will be NULL, see |
| 4270 | the definition of FACE_FROM_ID_OR_NULL. This will happen | 4269 | the definition of FACE_FROM_ID_OR_NULL. This will happen |
| 4271 | if this is the initial call that gets the face. */ | 4270 | if this is the initial call that gets the face. */ |
| 4272 | struct face *old_face = FACE_FROM_ID_OR_NULL (it->f, initial_face_id); | 4271 | struct face *old_face = FACE_FROM_ID_OR_NULL (it->f, it->face_id); |
| 4273 | 4272 | ||
| 4274 | /* If the value of face_id of the iterator is -1, we have to | 4273 | /* If the value of face_id of the iterator is -1, we have to |
| 4275 | look in front of IT's position and see whether there is a | 4274 | look in front of IT's position and see whether there is a |
| @@ -4300,7 +4299,7 @@ handle_face_prop_general (struct it *it, int initial_face_id, | |||
| 4300 | static enum prop_handled | 4299 | static enum prop_handled |
| 4301 | handle_face_prop (struct it *it) | 4300 | handle_face_prop (struct it *it) |
| 4302 | { | 4301 | { |
| 4303 | it->face_id = handle_face_prop_general (it, it->face_id, 0); | 4302 | it->face_id = face_at_pos (it, 0); |
| 4304 | return HANDLED_NORMALLY; | 4303 | return HANDLED_NORMALLY; |
| 4305 | } | 4304 | } |
| 4306 | 4305 | ||
| @@ -21582,15 +21581,15 @@ extend_face_to_end_of_line (struct it *it) | |||
| 21582 | || WINDOW_RIGHT_MARGIN_WIDTH (it->w) > 0)) | 21581 | || WINDOW_RIGHT_MARGIN_WIDTH (it->w) > 0)) |
| 21583 | return; | 21582 | return; |
| 21584 | 21583 | ||
| 21585 | it->extend_face_id | 21584 | const int extend_face_id |
| 21586 | = handle_face_prop_general (it, it->extend_face_id, LFACE_EXTEND_INDEX); | 21585 | = face_at_pos (it, LFACE_EXTEND_INDEX); |
| 21587 | 21586 | ||
| 21588 | /* Face extension extends the background and box of IT->extend_face_id | 21587 | /* Face extension extends the background and box of IT->extend_face_id |
| 21589 | to the end of the line. If the background equals the background | 21588 | to the end of the line. If the background equals the background |
| 21590 | of the frame, we don't have to do anything. */ | 21589 | of the frame, we don't have to do anything. */ |
| 21591 | face = FACE_FROM_ID (f, (it->face_before_selective_p | 21590 | face = FACE_FROM_ID (f, (it->face_before_selective_p |
| 21592 | ? it->saved_face_id | 21591 | ? it->saved_face_id |
| 21593 | : it->extend_face_id)); | 21592 | : extend_face_id)); |
| 21594 | 21593 | ||
| 21595 | if (FRAME_WINDOW_P (f) | 21594 | if (FRAME_WINDOW_P (f) |
| 21596 | && MATRIX_ROW_DISPLAYS_TEXT_P (it->glyph_row) | 21595 | && MATRIX_ROW_DISPLAYS_TEXT_P (it->glyph_row) |
| @@ -21683,7 +21682,7 @@ extend_face_to_end_of_line (struct it *it) | |||
| 21683 | Lisp_Object save_object = it->object; | 21682 | Lisp_Object save_object = it->object; |
| 21684 | const int saved_face_id = it->face_id; | 21683 | const int saved_face_id = it->face_id; |
| 21685 | 21684 | ||
| 21686 | it->face_id = it->extend_face_id; | 21685 | it->face_id = extend_face_id; |
| 21687 | it->avoid_cursor_p = true; | 21686 | it->avoid_cursor_p = true; |
| 21688 | it->object = Qnil; | 21687 | it->object = Qnil; |
| 21689 | 21688 | ||
| @@ -21717,7 +21716,7 @@ extend_face_to_end_of_line (struct it *it) | |||
| 21717 | = XFIXNAT (Vdisplay_fill_column_indicator_character); | 21716 | = XFIXNAT (Vdisplay_fill_column_indicator_character); |
| 21718 | it->face_id | 21717 | it->face_id |
| 21719 | = merge_faces (it->w, Qfill_column_indicator, | 21718 | = merge_faces (it->w, Qfill_column_indicator, |
| 21720 | 0, it->extend_face_id); | 21719 | 0, extend_face_id); |
| 21721 | PRODUCE_GLYPHS (it); | 21720 | PRODUCE_GLYPHS (it); |
| 21722 | it->face_id = save_face_id; | 21721 | it->face_id = save_face_id; |
| 21723 | } | 21722 | } |
| @@ -21864,7 +21863,7 @@ extend_face_to_end_of_line (struct it *it) | |||
| 21864 | { | 21863 | { |
| 21865 | int saved_face_id = it->face_id; | 21864 | int saved_face_id = it->face_id; |
| 21866 | it->face_id | 21865 | it->face_id |
| 21867 | = merge_faces (it->w, Qfill_column_indicator, 0, it->extend_face_id); | 21866 | = merge_faces (it->w, Qfill_column_indicator, 0, extend_face_id); |
| 21868 | it->c = it->char_to_display | 21867 | it->c = it->char_to_display |
| 21869 | = XFIXNAT (Vdisplay_fill_column_indicator_character); | 21868 | = XFIXNAT (Vdisplay_fill_column_indicator_character); |
| 21870 | 21869 | ||