aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJimmy Aguilar Mena2019-10-09 16:44:21 +0200
committerJimmy Aguilar Mena2019-10-14 14:18:42 +0200
commitcc47cd4202aa474cf83d6fc42d959460d3cf823f (patch)
treea4d60c664baf1ef95ccebef750c1e9ad271b8d20
parent0cf11eb2e80ec1e038654780c4833bea05ead05e (diff)
downloademacs-cc47cd4202aa474cf83d6fc42d959460d3cf823f.tar.gz
emacs-cc47cd4202aa474cf83d6fc42d959460d3cf823f.zip
; extend_face_id and fill_column_indicator corrections
*etc/NEWS: Correction for extend face and add some comments in the code.
-rw-r--r--etc/NEWS7
-rw-r--r--src/xdisp.c10
-rw-r--r--src/xfaces.c2
3 files changed, 14 insertions, 5 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 680ac038533..59237267f09 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -385,10 +385,11 @@ simply, makes "foo" complete to both "barfoo" and "frodo". Add 'flex'
385to 'completion-styles' or 'completion-category-overrides' to use it. 385to 'completion-styles' or 'completion-category-overrides' to use it.
386 386
387+++ 387+++
388** There is a new face attribute :extend to use the face attributes to 388** New face attribute ':extend' to control face extension at EOL.
389There is a new face attribute :extend to use the face attributes to
389extend after the end of the line until the end of the window. Such 390extend after the end of the line until the end of the window. Such
390:extend is set to nil by default in all faces except for `hl-line` and 391:extend is set to nil by default in all faces except for 'hl-line' and
391`region` because those extend until the end of the window by default. 392'region' because those extend until the end of the window by default.
392 393
393** Connection-local variables 394** Connection-local variables
394 395
diff --git a/src/xdisp.c b/src/xdisp.c
index 45462c5ac59..6c0b1f88488 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -442,7 +442,7 @@ fill_column_indicator_column (struct it *it, int char_width)
442 ? BVAR (current_buffer, fill_column) 442 ? BVAR (current_buffer, fill_column)
443 : Vdisplay_fill_column_indicator_column); 443 : Vdisplay_fill_column_indicator_column);
444 444
445 /* The stretch width needs to considet the latter 445 /* The stretch width needs to consider the latter
446 added glyph in append_space_for_newline. */ 446 added glyph in append_space_for_newline. */
447 if (RANGED_FIXNUMP (0, col, INT_MAX)) 447 if (RANGED_FIXNUMP (0, col, INT_MAX))
448 { 448 {
@@ -21691,6 +21691,9 @@ extend_face_to_end_of_line (struct it *it)
21691 && indicator_column < it->last_visible_x) 21691 && indicator_column < it->last_visible_x)
21692 { 21692 {
21693 21693
21694 /* Here we substract char_width because we want the
21695 column indicator in the column INDICATOR_COLUMN, not
21696 after it. */
21694 const int stretch_width = 21697 const int stretch_width =
21695 indicator_column - it->current_x - char_width; 21698 indicator_column - it->current_x - char_width;
21696 21699
@@ -21851,6 +21854,11 @@ extend_face_to_end_of_line (struct it *it)
21851 default_face->id : face->id); 21854 default_face->id : face->id);
21852 21855
21853 /* Display fill-column indicator if needed. */ 21856 /* Display fill-column indicator if needed. */
21857 /* We need to subtract 1 to the indicator_column here because we
21858 will add the indicator IN the column indicator number, not
21859 after it. We compare the variable it->current_x before
21860 producing the glyph. When FRAME_WINDOW_P we substract
21861 CHAR_WIDTH calculating STRETCH_WIDTH for the same reason. */
21854 const int indicator_column = 21862 const int indicator_column =
21855 fill_column_indicator_column (it, 1) - 1; 21863 fill_column_indicator_column (it, 1) - 1;
21856 do 21864 do
diff --git a/src/xfaces.c b/src/xfaces.c
index cc65527fe61..5a741ae8cc6 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -2284,7 +2284,7 @@ filter_face_ref (Lisp_Object face_ref,
2284 2284
2285 ATTR_FILTER is the index of a parameter that conditions the merging 2285 ATTR_FILTER is the index of a parameter that conditions the merging
2286 for named faces (case 1) to only the face_ref where 2286 for named faces (case 1) to only the face_ref where
2287 lface[merge_face_ref] is non-nil. To merge unconditionally set this 2287 lface[merge_face_ref] is non-nil. To merge unconditionally set this
2288 value to 0. 2288 value to 0.
2289 2289
2290 FACE_REF may be a single face specification or a list of such 2290 FACE_REF may be a single face specification or a list of such