[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] fill_column_indicator 8ee1093 3/9: Fixed fill-column-indic
From: |
Jimmy Aguilar Mena |
Subject: |
[Emacs-diffs] fill_column_indicator 8ee1093 3/9: Fixed fill-column-indicator for continuation lines |
Date: |
Wed, 1 May 2019 12:09:35 -0400 (EDT) |
branch: fill_column_indicator
commit 8ee1093ec6745eadeb3ab33b41ed27cae25484ff
Author: Jimmy Aguilar Mena <address@hidden>
Commit: Jimmy Aguilar Mena <address@hidden>
Fixed fill-column-indicator for continuation lines
Grouped the test conditions in a macro to simplify
future modifications.
---
src/xdisp.c | 27 +++++++++++++++------------
1 file changed, 15 insertions(+), 12 deletions(-)
diff --git a/src/xdisp.c b/src/xdisp.c
index ed6a10f..d739ce8 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -378,6 +378,13 @@ static Lisp_Object list_of_error;
&& (*BYTE_POS_ADDR (IT_BYTEPOS (*it)) == ' ' \
|| *BYTE_POS_ADDR (IT_BYTEPOS (*it)) == '\t')))) \
+/* Test all the conditions needed to print the fill column indicator. */
+#define FILL_COLUMN_INDICATOR_NEEDED(it) \
+ !NILP (Vdisplay_fill_column_indicator) \
+ && (it->continuation_lines_width == 0) \
+ && (!NILP (Vdisplay_fill_column_indicator_column)) \
+ && FIXNATP (Vdisplay_fill_column_indicator_character)
+
/* True means print newline to stdout before next mini-buffer message. */
bool noninteractive_need_newline;
@@ -20156,10 +20163,8 @@ append_space_for_newline (struct it *it, bool
default_face_p)
/* Corner case for when display-fill-column-indicator-mode
is active and the extra character should be added in the
same place than the line */
- if (!NILP (Vdisplay_fill_column_indicator)
- && (it->w->pseudo_window_p == 0)
- && (!NILP (Vdisplay_fill_column_indicator_column))
- && FIXNATP (Vdisplay_fill_column_indicator_character))
+ if ((it->w->pseudo_window_p == 0)
+ && FILL_COLUMN_INDICATOR_NEEDED(it))
{
int fill_column_indicator_column = -1;
@@ -20417,10 +20422,8 @@ extend_face_to_end_of_line (struct it *it)
/* Display fill column indicator if not in modeline or
toolbar and display fill column indicator mode is
active */
- if (!NILP (Vdisplay_fill_column_indicator)
- && (it->w->pseudo_window_p == 0)
- && (!NILP (Vdisplay_fill_column_indicator_column))
- && FIXNATP (Vdisplay_fill_column_indicator_character))
+ if ((it->w->pseudo_window_p == 0)
+ && FILL_COLUMN_INDICATOR_NEEDED(it))
{
int fill_column_indicator_column = -1;
@@ -20616,13 +20619,13 @@ extend_face_to_end_of_line (struct it *it)
else
it->face_id = face->id;
- /* Display fill-column-line if mode is active */
- if (!NILP (Vdisplay_fill_column_indicator)
- && (!NILP (Vdisplay_fill_column_indicator_column))
- && FIXNATP (Vdisplay_fill_column_indicator_character))
+ /* Display fill-column-line if needed. */
+ if (FILL_COLUMN_INDICATOR_NEEDED(it))
{
int fill_column_indicator_column = -1;
+ /* Vdisplay_fill_column_indicator_column accepts the special value t
+ to use the default fill-column variable. */
if (EQ (Vdisplay_fill_column_indicator_column, Qt)
&& FIXNATP (BVAR (current_buffer, fill_column)))
fill_column_indicator_column =
- [Emacs-diffs] branch fill_column_indicator created (now 650d842), Jimmy Aguilar Mena, 2019/05/01
- [Emacs-diffs] fill_column_indicator abc186b 4/9: Added fill-column-indicator manual documentation, Jimmy Aguilar Mena, 2019/05/01
- [Emacs-diffs] fill_column_indicator 8ee1093 3/9: Fixed fill-column-indicator for continuation lines,
Jimmy Aguilar Mena <=
- [Emacs-diffs] fill_column_indicator f8397af 1/9: display-fill-column-indicator-mode implementation., Jimmy Aguilar Mena, 2019/05/01
- [Emacs-diffs] fill_column_indicator 2cbef4a 2/9: Display-fill-column-indicator NEWS and t value for column value, Jimmy Aguilar Mena, 2019/05/01
- [Emacs-diffs] fill_column_indicator 650d842 9/9: *src/xdisp.c: Fixed fill column indicator position in terminal mode., Jimmy Aguilar Mena, 2019/05/01
- [Emacs-diffs] fill_column_indicator 2a34024 5/9: Added correction in the texinfo manual., Jimmy Aguilar Mena, 2019/05/01
- [Emacs-diffs] fill_column_indicator da8b623 6/9: Small changes in the documentation, Jimmy Aguilar Mena, 2019/05/01
- [Emacs-diffs] fill_column_indicator 2a17fae 8/9: display-fill-column-indicator.el condition, Jimmy Aguilar Mena, 2019/05/01
- [Emacs-diffs] fill_column_indicator 780f1ef 7/9: display-fill-column-indicator interface corrections, Jimmy Aguilar Mena, 2019/05/01