[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 4b06250: Do not use tick faces beyond ZV (bug#37641
From: |
Juanma Barranquero |
Subject: |
[Emacs-diffs] master 4b06250: Do not use tick faces beyond ZV (bug#37641) |
Date: |
Wed, 9 Oct 2019 06:37:43 -0400 (EDT) |
branch: master
commit 4b06250ef1fe98a766938862912383d2ee051dfb
Author: Juanma Barranquero <address@hidden>
Commit: Juanma Barranquero <address@hidden>
Do not use tick faces beyond ZV (bug#37641)
* src/xdisp.c (maybe_produce_line_number): Check beyond_zv
before using a tick face for the line number. Move all face
selection code outside the loop that draws the line number.
---
src/xdisp.c | 38 +++++++++++++++++++++-----------------
1 file changed, 21 insertions(+), 17 deletions(-)
diff --git a/src/xdisp.c b/src/xdisp.c
index 1586a02..52275a1 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -22657,29 +22657,33 @@ maybe_produce_line_number (struct it *it)
int width_limit =
tem_it.last_visible_x - tem_it.first_visible_x
- 3 * FRAME_COLUMN_WIDTH (it->f);
- /* Produce glyphs for the line number in a scratch glyph_row. */
- for (const char *p = lnum_buf; *p; p++)
- {
- /* For continuation lines and lines after ZV, instead of a line
- number, produce a blank prefix of the same width. */
- if (lnum_face_id != current_lnum_face_id
- && (EQ (Vdisplay_line_numbers, Qvisual)
- ? this_line == 0
- : this_line == it->pt_lnum)
- /* Avoid displaying the line-number-current-line face on
- empty lines beyond EOB. */
- && it->what != IT_EOB)
- tem_it.face_id = current_lnum_face_id;
- else if (display_line_numbers_major_tick > 0
- && (lnum_to_display % display_line_numbers_major_tick == 0))
+
+ tem_it.face_id = lnum_face_id;
+ /* Avoid displaying any face other than line-number on
+ empty lines beyond EOB. */
+ if (lnum_face_id != current_lnum_face_id
+ && (EQ (Vdisplay_line_numbers, Qvisual)
+ ? this_line == 0
+ : this_line == it->pt_lnum)
+ && it->what != IT_EOB)
+ tem_it.face_id = current_lnum_face_id;
+ else if (!beyond_zv)
+ {
+ if (display_line_numbers_major_tick > 0
+ && (lnum_to_display % display_line_numbers_major_tick == 0))
tem_it.face_id = merge_faces (it->w, Qline_number_major_tick,
0, DEFAULT_FACE_ID);
else if (display_line_numbers_minor_tick > 0
&& (lnum_to_display % display_line_numbers_minor_tick == 0))
tem_it.face_id = merge_faces (it->w, Qline_number_minor_tick,
0, DEFAULT_FACE_ID);
- else
- tem_it.face_id = lnum_face_id;
+ }
+
+ /* Produce glyphs for the line number in a scratch glyph_row. */
+ for (const char *p = lnum_buf; *p; p++)
+ {
+ /* For continuation lines and lines after ZV, instead of a line
+ number, produce a blank prefix of the same width. */
if (beyond_zv
/* Don't display the same line number more than once. */
|| (!EQ (Vdisplay_line_numbers, Qvisual)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 4b06250: Do not use tick faces beyond ZV (bug#37641),
Juanma Barranquero <=