From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#37641: major/minor tick faces bleed into empty lines at the end of buffer Date: Tue, 08 Oct 2019 11:49:53 +0300 Message-ID: <83sgo3y632.fsf@gnu.org> References: <83zhiczg1m.fsf@gnu.org> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="135065"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 37641@debbugs.gnu.org To: Juanma Barranquero Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 08 10:51:20 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 1iHlDB-000YyV-0x for geb-bug-gnu-emacs@m.gmane.org; Tue, 08 Oct 2019 10:51:17 +0200 Original-Received: from localhost ([::1]:52364 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iHlD9-0005gi-Ue for geb-bug-gnu-emacs@m.gmane.org; Tue, 08 Oct 2019 04:51:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59078) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iHlCy-0005gF-Iy for bug-gnu-emacs@gnu.org; Tue, 08 Oct 2019 04:51:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iHlCx-0002bA-H9 for bug-gnu-emacs@gnu.org; Tue, 08 Oct 2019 04:51:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40663) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iHlCx-0002au-Dy for bug-gnu-emacs@gnu.org; Tue, 08 Oct 2019 04:51:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iHlCw-0001mw-9r for bug-gnu-emacs@gnu.org; Tue, 08 Oct 2019 04:51:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Oct 2019 08:51:02 +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.15705246076809 (code B ref 37641); Tue, 08 Oct 2019 08:51:02 +0000 Original-Received: (at 37641) by debbugs.gnu.org; 8 Oct 2019 08:50:07 +0000 Original-Received: from localhost ([127.0.0.1]:49484 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iHlC2-0001ll-T8 for submit@debbugs.gnu.org; Tue, 08 Oct 2019 04:50:07 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:49868) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iHlC1-0001l1-Ov for 37641@debbugs.gnu.org; Tue, 08 Oct 2019 04:50:06 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:38138) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iHlBw-0001XN-IH; Tue, 08 Oct 2019 04:50:00 -0400 Original-Received: from [176.228.60.248] (port=2987 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iHlBu-0006tu-Hf; Tue, 08 Oct 2019 04:49:59 -0400 In-reply-to: (message from Juanma Barranquero on Tue, 8 Oct 2019 04:38:18 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:168615 Archived-At: > From: Juanma Barranquero > Date: Tue, 8 Oct 2019 04:38:18 +0200 > Cc: 37641@debbugs.gnu.org > > > Looks good, but please simplify by having 2-level if, the outer one > > checking when to display a number, the inner which face to use for > > that. There's no need to test beyond_zv more than once, and AFAIR > > beyond_zv and it->what == IT_EOB are equivalent. > > beyond_zv and it->what == IT_EOB are similar, but not equivalent. I see the difference when deleting empty > lines at the end of the buffer (specifically, when deleting from the last line, and not past the last line). > > With the `what' check, the face still bleed info the first post-EOB line. Checking beyond_zv it works (see > attached images). Sorry, I don't think I understand what the images show me. They seem identical. Which face bleeds and where? Please point out what should I be looking at to understand the difference. Did you try to arrange for the last line to be a multiple of one of the ticks as well? Also, what happens if you use the beyond_zv test in all the conditions, or use the it->what test in all the conditions? IOW, I don't understand why we need two different conditions regarding EOB for displaying a number with different faces. What am I missing? > As for simplifying the check, it is possible to check beyond_zv only once, with the minor downside of having > two paths to set lnum_face (which works as the default face, and the face post-EOB). You could simply start with tem_it.face_id = lnum_face_id; and then have a series of tests for replacing that with another face ID; it would at least save you the 'else' clause. Thanks.