aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJimmy Aguilar Mena2019-10-25 02:57:28 +0200
committerJimmy Aguilar Mena2019-10-29 14:34:00 +0100
commite0bcc25f64da44e3b5e68b66f361cfa73c0f79b2 (patch)
treece26754acc14ec34c6e6ada1ba28997b041d8715
parent8ae2a3a46b9c4cd2126f3c6504c619892ffff6ce (diff)
downloademacs-e0bcc25f64da44e3b5e68b66f361cfa73c0f79b2.tar.gz
emacs-e0bcc25f64da44e3b5e68b66f361cfa73c0f79b2.zip
Fix extend face in gui interfaces.
* src/xdisp.c (extend_face_to_end_of_line) : Change call to PRODUCE_GLYPHS with append_stretch_glyph to fill until the windows border.
-rw-r--r--src/xdisp.c30
1 files changed, 14 insertions, 16 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 987c760c743..8aefab964a8 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -21657,10 +21657,6 @@ extend_face_to_end_of_line (struct it *it)
21657 it->glyph_row->used[RIGHT_MARGIN_AREA] = 1; 21657 it->glyph_row->used[RIGHT_MARGIN_AREA] = 1;
21658 } 21658 }
21659 21659
21660 /* Display fill column indicator if not in modeline or
21661 toolbar and display fill column indicator mode is
21662 active. */
21663
21664 struct font *font = (default_face->font 21660 struct font *font = (default_face->font
21665 ? default_face->font 21661 ? default_face->font
21666 : FRAME_FONT (f)); 21662 : FRAME_FONT (f));
@@ -21683,14 +21679,17 @@ extend_face_to_end_of_line (struct it *it)
21683 it->avoid_cursor_p = true; 21679 it->avoid_cursor_p = true;
21684 it->object = Qnil; 21680 it->object = Qnil;
21685 21681
21682 const int stretch_ascent = (((it->ascent + it->descent)
21683 * FONT_BASE (font)) / FONT_HEIGHT (font));
21684
21686 if (indicator_column >= 0 21685 if (indicator_column >= 0
21687 && indicator_column > it->current_x 21686 && indicator_column > it->current_x
21688 && indicator_column < it->last_visible_x) 21687 && indicator_column < it->last_visible_x)
21689 { 21688 {
21690 21689
21691 /* Here we substract char_width because we want the 21690 /* Here we substract char_width because we want the
21692 column indicator in the column INDICATOR_COLUMN, not 21691 column indicator in the column INDICATOR_COLUMN,
21693 after it. */ 21692 not after it. */
21694 const int stretch_width = 21693 const int stretch_width =
21695 indicator_column - it->current_x - char_width; 21694 indicator_column - it->current_x - char_width;
21696 21695
@@ -21700,8 +21699,6 @@ extend_face_to_end_of_line (struct it *it)
21700 between current_x and the indicator position. */ 21699 between current_x and the indicator position. */
21701 if (stretch_width > 0) 21700 if (stretch_width > 0)
21702 { 21701 {
21703 int stretch_ascent = (((it->ascent + it->descent)
21704 * FONT_BASE (font)) / FONT_HEIGHT (font));
21705 append_stretch_glyph (it, Qnil, stretch_width, 21702 append_stretch_glyph (it, Qnil, stretch_width,
21706 it->ascent + it->descent, 21703 it->ascent + it->descent,
21707 stretch_ascent); 21704 stretch_ascent);
@@ -21720,13 +21717,15 @@ extend_face_to_end_of_line (struct it *it)
21720 PRODUCE_GLYPHS (it); 21717 PRODUCE_GLYPHS (it);
21721 it->face_id = save_face_id; 21718 it->face_id = save_face_id;
21722 } 21719 }
21723 } 21720 }
21724 21721
21725 /* If there is space after the indicator generate an 21722 /* Fill space until window edge with the merged face. */
21726 extra empty glyph to restore the face. Issue was 21723 const int stretch_width = it->last_visible_x - it->current_x;
21727 observed in X systems. */ 21724
21728 it->char_to_display = ' '; 21725 if (stretch_width > 0)
21729 PRODUCE_GLYPHS (it); 21726 append_stretch_glyph (it, Qnil, stretch_width,
21727 it->ascent + it->descent,
21728 stretch_ascent);
21730 21729
21731 it->char_to_display = saved_char; 21730 it->char_to_display = saved_char;
21732 it->position = saved_pos; 21731 it->position = saved_pos;
@@ -21734,7 +21733,6 @@ extend_face_to_end_of_line (struct it *it)
21734 it->start_of_box_run_p = saved_box_start; 21733 it->start_of_box_run_p = saved_box_start;
21735 it->object = save_object; 21734 it->object = save_object;
21736 it->face_id = saved_face_id; 21735 it->face_id = saved_face_id;
21737
21738 } 21736 }
21739 if (it->glyph_row->reversed_p) 21737 if (it->glyph_row->reversed_p)
21740 { 21738 {