[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] feature/extend_face_id 7f68e80 17/19: ; extend_face_id and
From: |
Jimmy Aguilar Mena |
Subject: |
[Emacs-diffs] feature/extend_face_id 7f68e80 17/19: ; extend_face_id and fill_column_indicator corrections |
Date: |
Sun, 13 Oct 2019 17:30:00 -0400 (EDT) |
branch: feature/extend_face_id
commit 7f68e80d4f15321557a4cba5f775bbbe915e109b
Author: Jimmy Aguilar Mena <address@hidden>
Commit: Jimmy Aguilar Mena <address@hidden>
; extend_face_id and fill_column_indicator corrections
* Fix NEWS and add some comments in the code.
---
etc/NEWS | 7 ++++---
src/xdisp.c | 10 +++++++++-
src/xfaces.c | 2 +-
3 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/etc/NEWS b/etc/NEWS
index c2eaa36..af19ca9 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -385,10 +385,11 @@ simply, makes "foo" complete to both "barfoo" and
"frodo". Add 'flex'
to 'completion-styles' or 'completion-category-overrides' to use it.
+++
-** There is a new face attribute :extend to use the face attributes to
+** New face attribute ':extend' to control face extension at EOL.
+There is a new face attribute :extend to use the face attributes to
extend after the end of the line until the end of the window. Such
-:extend is set to nil by default in all faces except for `hl-line` and
-`region` because those extend until the end of the window by default.
+:extend is set to nil by default in all faces except for 'hl-line' and
+'region' because those extend until the end of the window by default.
** Connection-local variables
diff --git a/src/xdisp.c b/src/xdisp.c
index 63d0f32..8407ac3 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))
{
@@ -21698,6 +21698,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;
@@ -21858,6 +21861,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
diff --git a/src/xfaces.c b/src/xfaces.c
index cc65527..5a741ae 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -2284,7 +2284,7 @@ filter_face_ref (Lisp_Object face_ref,
ATTR_FILTER is the index of a parameter that conditions the merging
for named faces (case 1) to only the face_ref where
- lface[merge_face_ref] is non-nil. To merge unconditionally set this
+ lface[merge_face_ref] is non-nil. To merge unconditionally set this
value to 0.
FACE_REF may be a single face specification or a list of such
- [Emacs-diffs] branch feature/extend_face_id created (now 87f80cf), Jimmy Aguilar Mena, 2019/10/13
- [Emacs-diffs] feature/extend_face_id 50c0cca 01/19: Simplify struct face to use only underline., Jimmy Aguilar Mena, 2019/10/13
- [Emacs-diffs] feature/extend_face_id 5c1bfd8 07/19: Changed handle_face_prop_general prototype., Jimmy Aguilar Mena, 2019/10/13
- [Emacs-diffs] feature/extend_face_id 4a4752a 02/19: Added face parameter :extend., Jimmy Aguilar Mena, 2019/10/13
- [Emacs-diffs] feature/extend_face_id f3f0a28 05/19: WIP: BUG HERE, Jimmy Aguilar Mena, 2019/10/13
- [Emacs-diffs] feature/extend_face_id 719fd61 06/19: Fixed extend face filtered for prop., Jimmy Aguilar Mena, 2019/10/13
- [Emacs-diffs] feature/extend_face_id 14f65d4 08/19: Add space for cursor to work also in terminal., Jimmy Aguilar Mena, 2019/10/13
- [Emacs-diffs] feature/extend_face_id 575c65d 18/19: Modify face_at_pos to not modify change IT., Jimmy Aguilar Mena, 2019/10/13
- [Emacs-diffs] feature/extend_face_id 06048fb 15/19: Document new :extend face attribute in manuals., Jimmy Aguilar Mena, 2019/10/13
- [Emacs-diffs] feature/extend_face_id 7f68e80 17/19: ; extend_face_id and fill_column_indicator corrections,
Jimmy Aguilar Mena <=
- [Emacs-diffs] feature/extend_face_id 87f80cf 19/19: Fix issue when calling face_at_pos., Jimmy Aguilar Mena, 2019/10/13
- [Emacs-diffs] feature/extend_face_id 579134d 14/19: Fixed merge_face_ref recursive calls., Jimmy Aguilar Mena, 2019/10/13
- [Emacs-diffs] feature/extend_face_id cf0b7e2 12/19: Extend_face simplify., Jimmy Aguilar Mena, 2019/10/13
- [Emacs-diffs] feature/extend_face_id 077e488 11/19: Added parameter attr_filter to face_at_string_position., Jimmy Aguilar Mena, 2019/10/13
- [Emacs-diffs] feature/extend_face_id 372047a 03/19: New parameter to control the face extension.., Jimmy Aguilar Mena, 2019/10/13
- [Emacs-diffs] feature/extend_face_id e5076c9 16/19: * etc/NEWS : Added comment about :extend face attribute in NEWS., Jimmy Aguilar Mena, 2019/10/13
- [Emacs-diffs] feature/extend_face_id 1b12eca 13/19: Optimization in extend_face, Jimmy Aguilar Mena, 2019/10/13
- [Emacs-diffs] feature/extend_face_id 666b687 10/19: Make hl-line face to extend all the line.., Jimmy Aguilar Mena, 2019/10/13
- [Emacs-diffs] feature/extend_face_id 5ddf21e 04/19: Update dfci code with new extend_face attribute., Jimmy Aguilar Mena, 2019/10/13
- [Emacs-diffs] feature/extend_face_id d6afc87 09/19: Fix last change in append_space_for_newline., Jimmy Aguilar Mena, 2019/10/13