diff options
| author | Jimmy Aguilar Mena | 2019-10-09 16:44:21 +0200 |
|---|---|---|
| committer | Jimmy Aguilar Mena | 2019-10-14 14:18:42 +0200 |
| commit | cc47cd4202aa474cf83d6fc42d959460d3cf823f (patch) | |
| tree | a4d60c664baf1ef95ccebef750c1e9ad271b8d20 /src | |
| parent | 0cf11eb2e80ec1e038654780c4833bea05ead05e (diff) | |
| download | emacs-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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 10 | ||||
| -rw-r--r-- | src/xfaces.c | 2 |
2 files changed, 10 insertions, 2 deletions
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 |