From d5f8a3d03f6c0c98f3280d55a2d88ddb40aa1f3e Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 4 Jul 2017 18:43:03 +0300 Subject: [PATCH] Fix display of current line number in visual mode * src/xdisp.c (maybe_produce_line_number): Fix visual-mode display of current line when line-number-current-line face was customized. Reported by Filipe Silva . --- src/xdisp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/xdisp.c b/src/xdisp.c index 47b81414630..312ee10f280 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -20938,7 +20938,10 @@ maybe_produce_line_number (struct it *it) default face for the blank field beyond ZV. */ if (beyond_zv) tem_it.face_id = it->base_face_id; - else if (lnum_face_id != current_lnum_face_id && this_line == it->pt_lnum) + else if (lnum_face_id != current_lnum_face_id + && (EQ (Vdisplay_line_numbers, Qvisual) + ? this_line == 0 + : this_line == it->pt_lnum)) tem_it.face_id = current_lnum_face_id; else tem_it.face_id = lnum_face_id; -- 2.39.5