unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Fernando Peña" <ferpb1999@gmail.com>
To: 42254@debbugs.gnu.org
Subject: bug#42254: 27.0.91; display-line-numbers-mode incoherent shifting behaviour
Date: Tue, 7 Jul 2020 23:55:12 +0200	[thread overview]
Message-ID: <CAAnJb_H=cTi46SSts2auwj9sRzZ4YApRJOBtjTvUHxmH8_13Cg@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 4097 bytes --]

Hello,

I've noticed that when displaying line numbers with
display-line-numbers-mode, the buffer shifts to the right to make space
for one more digit before the line whose number has one more digit
appears on the screen.

The line number where it shifts seems to depend on the width of the
frame, but for example with 3 digits, the buffer shifts around line 90,
before the 100th is on the screen. This happens even if the file has
less than 100 lines, leaving and excessive space on the left side of the
line numbers.

I'd expect that the buffer only shifted to the left when it was strictly
necessary. In this case, when the number 100 was shown on screen.

I hope it can be solved. I find it really annoying, especially when the
file doesn't have line numbers with that extra digit.

Greetings,

Fernando


In GNU Emacs 27.0.91 (build 1, x86_64-apple-darwin19.5.0, NS appkit-1894.50
Version 10.15.5 (Build 19F101))
of 2020-06-17 built on iMac-de-User.local
Repository revision: a71d1787f128c642f8a1fb297ef5043e20218646
Repository branch: emacs-27
Windowing system distributor 'Apple', version 10.3.1894
System Description:  Mac OS X 10.15.5

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Quit
Display-Line-Numbers mode enabled in current buffer
Making completion list...
101 (#o145, #x65, ?e)
Making completion list...

Configured using:
'configure --enable-locallisppath=/usr/local/share/emacs/site-lisp
--infodir=/usr/local/Cellar/emacs-head@27/HEAD-a71d178_1/share/info/emacs
--prefix=/usr/local/Cellar/emacs-head@27/HEAD-a71d178_1 --without-x
--without-dbus --without-imagemagick --with-modules --with-gnutls
--with-rsvg --with-xml2 --with-ns --disable-ns-self-contained
--with-harfbuzz'

Configured features:
RSVG GLIB NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS
MODULES THREADS JSON PDUMPER LCMS2 GMP

Important settings:
  value of $LC_ALL: en_US.UTF-8
  value of $LANG: es_ES.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  display-line-numbers-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg
epg-config gnus-util rmail rmail-loaddefs text-property-search time-date
subr-x seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs
cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
display-line-numbers tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/ns-win ns-win ucs-normalize mule-util
term/common-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads kqueue cocoa ns lcms2 multi-tty make-network-process
emacs)

Memory information:
((conses 16 45832 11204)
(symbols 48 5949 1)
(strings 32 15408 1983)
(string-bytes 1 518053)
(vectors 16 10250)
(vector-slots 8 127529 16008)
(floats 8 20 28)
(intervals 56 240 0)
(buffers 1000 13))

[-- Attachment #2: Type: text/html, Size: 18826 bytes --]

             reply	other threads:[~2020-07-07 21:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-07 21:55 Fernando Peña [this message]
2020-07-08 14:10 ` bug#42254: 27.0.91; display-line-numbers-mode incoherent shifting behaviour Eli Zaretskii
     [not found]   ` <CAAnJb_HZAVd2GOD7kScP_BkSRvZjkJosA2VjWz4J8jpnMdwjiQ@mail.gmail.com>
2020-07-08 14:50     ` Eli Zaretskii
2020-07-08 15:02       ` Fernando Peña
2020-07-08 15:09         ` Fernando Peña
2020-07-08 16:21         ` Eli Zaretskii
2020-07-08 17:02           ` Fernando Peña
2020-08-13  0:29           ` Stefan Kangas

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='CAAnJb_H=cTi46SSts2auwj9sRzZ4YApRJOBtjTvUHxmH8_13Cg@mail.gmail.com' \
    --to=ferpb1999@gmail.com \
    --cc=42254@debbugs.gnu.org \
    /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).