GNU bug report logs - #32337
26.1; display-line-numbers-mode makes cursor ill-aligned when number face is changed

Previous Next

Package: emacs;

Reported by: Carlos Pita <carlosjosepita <at> gmail.com>

Date: Tue, 31 Jul 2018 19:20:02 UTC

Severity: minor

Found in version 26.1

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Carlos Pita <carlosjosepita <at> gmail.com>
Cc: 32337 <at> 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
> From: Carlos Pita <carlosjosepita <at> 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.




This bug report was last modified 6 years and 126 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.