summaryrefslogtreecommitdiff
path: root/src/xdisp.c
diff options
context:
space:
mode:
authorJimmy Aguilar Mena <spacibba@aol.com>2019-10-09 16:44:21 +0200
committerJimmy Aguilar Mena <spacibba@aol.com>2019-10-14 14:18:42 +0200
commitcc47cd4202aa474cf83d6fc42d959460d3cf823f (patch)
treea4d60c664baf1ef95ccebef750c1e9ad271b8d20 /src/xdisp.c
parent0cf11eb2e80ec1e038654780c4833bea05ead05e (diff)
downloademacs-cc47cd4202aa474cf83d6fc42d959460d3cf823f.tar.gz
emacs-cc47cd4202aa474cf83d6fc42d959460d3cf823f.tar.bz2
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/xdisp.c')
-rw-r--r--src/xdisp.c10
1 files changed, 9 insertions, 1 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)
? BVAR (current_buffer, fill_column)
: Vdisplay_fill_column_indicator_column);
- /* The stretch width needs to considet the latter
+ /* The stretch width needs to consider the latter
added glyph in append_space_for_newline. */
if (RANGED_FIXNUMP (0, col, INT_MAX))
{
@@ -21691,6 +21691,9 @@ extend_face_to_end_of_line (struct it *it)
&& indicator_column < it->last_visible_x)
{
+ /* Here we substract char_width because we want the
+ column indicator in the column INDICATOR_COLUMN, not
+ after it. */
const int stretch_width =
indicator_column - it->current_x - char_width;
@@ -21851,6 +21854,11 @@ extend_face_to_end_of_line (struct it *it)
default_face->id : face->id);
/* Display fill-column indicator if needed. */
+ /* We need to subtract 1 to the indicator_column here because we
+ will add the indicator IN the column indicator number, not
+ after it. We compare the variable it->current_x before
+ producing the glyph. When FRAME_WINDOW_P we substract
+ CHAR_WIDTH calculating STRETCH_WIDTH for the same reason. */
const int indicator_column =
fill_column_indicator_column (it, 1) - 1;
do