unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Carlos Pita <carlosjosepita@gmail.com>
Cc: 32337@debbugs.gnu.org
Subject: bug#32337: 26.1; display-line-numbers-mode makes cursor ill-aligned when number face is changed
Date: Wed, 01 Aug 2018 10:47:56 +0300	[thread overview]
Message-ID: <83a7q6o7df.fsf@gnu.org> (raw)
In-Reply-To: <87effjtdpw.fsf@gmail.com> (message from Carlos Pita on Tue, 31 Jul 2018 16:19:39 -0300)

> From: Carlos Pita <carlosjosepita@gmail.com>
> Date: Tue, 31 Jul 2018 16:19:39 -0300
> 
> With the new display-line-numbers-mode, if you customize faces to
> something like, say:
> 
>  '(line-number ((t (:height 0.85))))
>  '(line-number-current-line ((t (:height 0.85))))
> 
> Then the cursor will be ill-aligned (a bit shifted to the right) when
> it's in the last line of the buffer. This line has no number and it
> seems to be that the spacing is miscalculated using the default face
> size.

The empty "line" beyond EOB has the line-number field displayed using
the default face, indeed.  That's by design: using the same face as
for line numbers produces ugly effects, IMO, e.g., if the line-number
face defines a background color.  So I decided to use the default face
for that single place.  It doesn't look too bad, IMO, even in the case
you reported, as there's no text after the cursor.

I'd rather not introduce more complexity (like user options etc.),
unless the current display is deemed entirely unacceptable in such
cases.

Thanks.





      parent reply	other threads:[~2018-08-01  7:47 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-31 19:19 bug#32337: 26.1; display-line-numbers-mode makes cursor ill-aligned when number face is changed Carlos Pita
2018-07-31 19:26 ` Carlos Pita
2018-08-01  7:48   ` Eli Zaretskii
2018-08-01 10:33     ` Carlos Pita
2018-08-01 10:38       ` Carlos Pita
2018-08-01 11:50       ` Eli Zaretskii
2018-08-01 12:03         ` Carlos Pita
2018-08-01 12:09           ` Eli Zaretskii
2018-08-01 12:31             ` Carlos Pita
2018-08-01 12:34               ` Eli Zaretskii
2018-08-02  2:08                 ` Richard Stallman
2018-08-02 23:06                   ` Carlos Pita
2018-08-03  6:03                     ` Eli Zaretskii
2018-08-03 18:40                       ` Carlos Pita
2018-08-03 23:14                         ` Carlos Pita
2018-08-04  6:29                           ` Eli Zaretskii
2018-08-04  7:07                             ` Eli Zaretskii
2018-08-07 17:12                               ` Carlos Pita
2018-08-31 12:10                                 ` Carlos Pita
2018-09-01 13:39                                   ` Eli Zaretskii
2018-09-01 14:50                                     ` Carlos Pita
2018-09-07  7:53                                       ` Eli Zaretskii
2018-09-25 19:27                                         ` Carlos Pita
2018-09-25 19:40                                           ` Carlos Pita
2018-09-25 19:54                                             ` Eli Zaretskii
2018-09-25 20:00                                               ` Carlos Pita
2018-09-25 19:46                                           ` Eli Zaretskii
2018-09-25 19:52                                             ` Carlos Pita
2018-09-26 15:39                                             ` Eli Zaretskii
2018-09-26 16:16                                               ` Carlos Pita
2018-09-26 19:20                                                 ` Eli Zaretskii
2018-10-10 18:33                                                   ` Carlos Pita
2018-10-13  6:46                                                     ` Eli Zaretskii
     [not found]                                                       ` <CAELgYhceFMmTc=G3VY6rmHKsk+g5upsM_n7w1xvjU-dvf7ZYYA@mail.gmail.com>
2019-02-19 15:26                                                         ` Carlos Pita
2019-02-19 15:27                                                           ` Carlos Pita
2019-02-19 16:57                                                         ` Eli Zaretskii
2019-02-19 20:01                                                           ` Carlos Pita
2019-02-19 22:38                                                             ` Carlos Pita
2018-08-01  7:47 ` Eli Zaretskii [this message]

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=83a7q6o7df.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=32337@debbugs.gnu.org \
    --cc=carlosjosepita@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).