From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.bugs Subject: bug#37641: major/minor tick faces bleed into empty lines at the end of buffer Date: Mon, 7 Oct 2019 05:42:46 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000604992059449da12" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="250691"; mail-complaints-to="usenet@blaine.gmane.org" To: 37641@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 07 05:44:12 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iHJwR-00136w-FJ for geb-bug-gnu-emacs@m.gmane.org; Mon, 07 Oct 2019 05:44:11 +0200 Original-Received: from localhost ([::1]:40402 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iHJwP-0001cN-MH for geb-bug-gnu-emacs@m.gmane.org; Sun, 06 Oct 2019 23:44:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49310) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iHJwJ-0001cF-9x for bug-gnu-emacs@gnu.org; Sun, 06 Oct 2019 23:44:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iHJwI-0005R6-98 for bug-gnu-emacs@gnu.org; Sun, 06 Oct 2019 23:44:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38308) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iHJwI-0005R1-4B for bug-gnu-emacs@gnu.org; Sun, 06 Oct 2019 23:44:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iHJwI-0003LK-1E for bug-gnu-emacs@gnu.org; Sun, 06 Oct 2019 23:44:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juanma Barranquero Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 07 Oct 2019 03:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37641 X-GNU-PR-Package: emacs Original-Received: via spool by 37641-submit@debbugs.gnu.org id=B37641.157041980912803 (code B ref 37641); Mon, 07 Oct 2019 03:44:01 +0000 Original-Received: (at 37641) by debbugs.gnu.org; 7 Oct 2019 03:43:29 +0000 Original-Received: from localhost ([127.0.0.1]:47129 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iHJvl-0003KQ-0g for submit@debbugs.gnu.org; Sun, 06 Oct 2019 23:43:29 -0400 Original-Received: from mail-qk1-f193.google.com ([209.85.222.193]:44875) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iHJvj-0003KE-8m for 37641@debbugs.gnu.org; Sun, 06 Oct 2019 23:43:27 -0400 Original-Received: by mail-qk1-f193.google.com with SMTP id u22so11304834qkk.11 for <37641@debbugs.gnu.org>; Sun, 06 Oct 2019 20:43:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=KlBtCue2zTL0U/Tqn7N0vzDWDshxw1lyVaHsh3g2pT8=; b=O8FUFh7rEkrfhi7LhUALOCkkhW0YTF4k5AfzXqKDS+3UwQZ8Se7idVVHLC8Ogywz4N 3PdBDTs7lgD7YmycEl/Jy/MzwCb23n0imb/96kLQNftX5JaJj9g7mvYkbBnpqhPfFujU aCMx9cHSF7GeZtzycUnZ6ZcSqVIdyliDknV6hKNWMcry6/ShMh7OC92K88kPH2oNMQPo 38VmHig+H6qvsHA8m4gMCcqNiz+faz5gSedi5VYKcFWKzLxA+X/Ua01QkxO22ZA4BkkS QkDG9x5nPrXf448JvtviPW70AKneCygVCuE4S3gZLbsP56auZYjeEClESkIZHiywp6ls gzew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=KlBtCue2zTL0U/Tqn7N0vzDWDshxw1lyVaHsh3g2pT8=; b=M6q7YDV0VagEAIDHifYL96SSCCZDXNmhTRU4s5VuPur75nQ68x2+iEd7O+WYbrGUZ3 I0Ffmn79H5UbmjCKKqP9bLyhA+nBuxJOKpYlYVSwwzd9YarTnPudiPpp5arwjY6XPFhZ 5pkAYsVRQlSLBR2eG7LJ/Ae4CF1VDcrSJ0u13uUbvliaURZ+0txn4NWUx+2PUomXxPIU +8i4a3cDKTgVt/sevJ4zpzEPRFUznqfMAgizOQwrVwmX02anonDbuh6eZNG0jENnNill //yrAsh7Oct3FS+Br9QEDU6Ci6EdZH0VYY/qyblaYJGXu9Glxa40XOTEDcue5TeCLsQY yCCA== X-Gm-Message-State: APjAAAWx2s8nM4i+NU6zHxLGpQXuajekSCOV8PzRfIeaMO02eddtFnUf VpjyzkDtYL5teC6+nqDD9UT8aqfDs1KbG9ymTRwjxsaQ X-Google-Smtp-Source: APXvYqy6KOCi9h/bLUQGWkXIb8QJYRfMb2i2Kx0Bmnjxv/QkKlpSXLHGVq9+kQfjPMg3FE9nBt7lPorrr+xp7LAsCG4= X-Received: by 2002:a37:a411:: with SMTP id n17mr21870504qke.216.1570419800818; Sun, 06 Oct 2019 20:43:20 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:168486 Archived-At: --000000000000604992059449da12 Content-Type: text/plain; charset="UTF-8" This patch seems to fix the problem. diff --git i/src/xdisp.c w/src/xdisp.c index 563cf473cf..a2d605f3ea 100644 --- i/src/xdisp.c +++ w/src/xdisp.c @@ -22679,9 +22679,11 @@ maybe_produce_line_number (struct it *it) && it->what != IT_EOB) tem_it.face_id = current_lnum_face_id; - else if (display_line_numbers_major_tick > 0 + else if (!beyond_zv + && 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 + else if (!beyond_zv + && 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, --000000000000604992059449da12 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
This patch seems to fix the problem.

diff --git i/src/xdisp.c w/src/xdisp.c
index 563cf473cf..a2d605f3ea 10= 0644
--- i/src/xdisp.c
+++ w/src/xdisp.c
@@ -22679,9 +22679,11 @@ = maybe_produce_line_number (struct it *it)
=C2=A0 =C2=A0&& it-&g= t;what !=3D IT_EOB)
=C2=A0 tem_it.face_id =3D current_lnum_face_id;
-= =C2=A0 =C2=A0 =C2=A0else if (display_line_numbers_major_tick > 0
+ = =C2=A0 =C2=A0 =C2=A0else if (!beyond_zv
+ =C2=A0 =C2=A0 =C2=A0 &&am= p; display_line_numbers_major_tick > 0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 &= amp;& (lnum_to_display % display_line_numbers_major_tick =3D=3D 0))
= =C2=A0 tem_it.face_id =3D merge_faces (it->w, Qline_number_major_tick,=C2=A0 =C2=A0 =C2=A0 =C2=A00, DEFAULT_FACE_ID);
- =C2=A0 =C2=A0 = =C2=A0else if (display_line_numbers_minor_tick > 0
+ =C2=A0 =C2=A0 = =C2=A0else if (!beyond_zv
+ =C2=A0 =C2=A0 =C2=A0 && display_lin= e_numbers_minor_tick > 0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 && (lnu= m_to_display % display_line_numbers_minor_tick =3D=3D 0))
=C2=A0 tem_it.= face_id =3D merge_faces (it->w, Qline_number_minor_tick,
--000000000000604992059449da12--