From: Eli Zaretskii <eliz@gnu.org>
To: Juanma Barranquero <lekktu@gmail.com>
Cc: 37641@debbugs.gnu.org
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 [thread overview]
Message-ID: <83sgo3y632.fsf@gnu.org> (raw)
In-Reply-To: <CAAeL0SRFM5s+3tVxH_ZKe3rUM2s+HoCMPgRJYN+qnye8urD1kw@mail.gmail.com> (message from Juanma Barranquero on Tue, 8 Oct 2019 04:38:18 +0200)
> From: Juanma Barranquero <lekktu@gmail.com>
> 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.
next prev parent reply other threads:[~2019-10-08 8:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-07 1:04 bug#37641: major/minor tick faces bleed into empty lines at the end of buffer Juanma Barranquero
2019-10-07 3:42 ` Juanma Barranquero
2019-10-07 16:17 ` Eli Zaretskii
2019-10-08 2:38 ` Juanma Barranquero
2019-10-08 4:23 ` Juanma Barranquero
2019-10-08 8:51 ` Eli Zaretskii
2019-10-08 8:49 ` Eli Zaretskii [this message]
2019-10-08 9:37 ` Juanma Barranquero
2019-10-08 10:47 ` Juanma Barranquero
2019-10-09 10:22 ` Eli Zaretskii
2019-10-09 10:39 ` Juanma Barranquero
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83sgo3y632.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=37641@debbugs.gnu.org \
--cc=lekktu@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).