GNU bug report logs -
#49891
28.0.50; Automatic hscroll does not consider line numbers when checking hscroll-margin, causing point to get stuck in the margin when using a small hscroll-step
Previous Next
Reported by: Leonardo Dagnino <leodag.sch <at> gmail.com>
Date: Thu, 5 Aug 2021 15:01:01 UTC
Severity: normal
Found in version 28.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 49891 in the body.
You can then email your comments to 49891 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#49891
; Package
emacs
.
(Thu, 05 Aug 2021 15:01:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Leonardo Dagnino <leodag.sch <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Thu, 05 Aug 2021 15:01:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Steps to reproduce in emacs -Q:
(display-line-numbers-mode)
(setq truncate-lines t
hscroll-step 1)
(insert-char ?a 200)
Then press left arrow until point gets in hscroll-margin. The point
will be inside the margin, at buffer's column hscroll-margin minus
display-line-numbers's current width. Even pressing right arrow still
has point inside the margin, triggering the bug again, making it
"stuck" at that column.
Also happens when lines are truncated because of
`truncate-partial-width-windows'.
Slightly different cases where this bug occurs (tested by setting
display-line-numbers-width to the desired line-number-display-width):
- In emacs -Q, it will work as expected if line-number-display-width
>= hscroll-margin -1 (example: 7 and 8, respectively). However it is
still buggy on my personal init.el, point gets briefly (maybe about
0.1s?) drawn on the rightmost column of the line number (the one that
usually never has anything on it, right before the buffer's text
starts). Maybe it's because with emacs -Q this second draw happens so
fast the first one is not visible?
- gets stuck in hscroll-margin if line-number-display-width <
hscroll-margin - 2 (example: 5 and 8, respectively)
- when line-number-display-width == hscroll-margin - 2, alternates
between "stuck in the margin" and "hscroll-margin columns from window
edge" every time you press the left arrow (example: 6 and 8).
In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.30, cairo version 1.17.4)
of 2021-08-04 built on shinsou
Repository revision: 4b729ff60887f2de320a99cf1fb4c734d1145b00
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12013000
System Description: Arch Linux
Configured using:
'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
--localstatedir=/var --mandir=/usr/share/man --with-gameuser=:games
--with-sound=alsa --with-modules --without-gconf --without-gsettings
--enable-link-time-optimization --with-x-toolkit=gtk3 --without-xaw3d
--without-compress-install
'--program-transform-name=s/\([ec]tags\)/\1.emacs/'
'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions
-Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security
-fstack-clash-protection -fcf-protection -flto -fuse-linker-plugin'
LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'
Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM HARFBUZZ JPEG JSON LCMS2
LIBOTF LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY PDUMPER PNG
RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM
GTK3 ZLIB
Important settings:
value of $LC_MONETARY: pt_BR.UTF-8
value of $LC_NUMERIC: pt_BR.UTF-8
value of $LC_TIME: pt_BR.UTF-8
value of $LANG: en_US.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
indent-tabs-mode: t
transient-mark-mode: t
Load-path shadows:
None found.
Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
rfc822 mml mml-sec epa derived epg epg-config gnus-util rmail
rmail-loaddefs auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache json map text-property-search mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
time-date subr-x cl-extra seq byte-opt gv bytecomp byte-compile cconv pp
cl-print help-fns radix-tree help-mode cl-loaddefs cl-lib
display-line-numbers iso-transl tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win
term/common-win x-dnd 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 easymenu
timer select scroll-bar mouse jit-lock font-lock syntax 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 button
loaddefs faces cus-face macroexp files window text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote threads dbusbind inotify lcms2
dynamic-setting font-render-setting cairo move-toolbar gtk x-toolkit x
multi-tty make-network-process emacs)
Memory information:
((conses 16 374670 144142)
(symbols 48 26281 2)
(strings 32 100311 5337)
(string-bytes 1 3452695)
(vectors 16 51112)
(vector-slots 8 1507408 148478)
(floats 8 756 670)
(intervals 56 8951 4879)
(buffers 992 25))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#49891
; Package
emacs
.
(Fri, 06 Aug 2021 07:56:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 49891 <at> debbugs.gnu.org (full text, mbox):
> From: Leonardo Dagnino <leodag.sch <at> gmail.com>
> Date: Thu, 5 Aug 2021 00:32:25 -0300
>
> Steps to reproduce in emacs -Q:
> (display-line-numbers-mode)
> (setq truncate-lines t
> hscroll-step 1)
> (insert-char ?a 200)
>
> Then press left arrow until point gets in hscroll-margin. The point
> will be inside the margin, at buffer's column hscroll-margin minus
> display-line-numbers's current width. Even pressing right arrow still
> has point inside the margin, triggering the bug again, making it
> "stuck" at that column.
Thanks, this should be fixed now on the master branch; please test.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#49891
; Package
emacs
.
(Sun, 08 Aug 2021 06:11:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 49891 <at> debbugs.gnu.org (full text, mbox):
It is fixed indeed, tested with multiple values and seems to be
working as expected in all cases.
Thanks for the quick fix!
Em sex., 6 de ago. de 2021 às 04:55, Eli Zaretskii <eliz <at> gnu.org> escreveu:
>
> > From: Leonardo Dagnino <leodag.sch <at> gmail.com>
> > Date: Thu, 5 Aug 2021 00:32:25 -0300
> >
> > Steps to reproduce in emacs -Q:
> > (display-line-numbers-mode)
> > (setq truncate-lines t
> > hscroll-step 1)
> > (insert-char ?a 200)
> >
> > Then press left arrow until point gets in hscroll-margin. The point
> > will be inside the margin, at buffer's column hscroll-margin minus
> > display-line-numbers's current width. Even pressing right arrow still
> > has point inside the margin, triggering the bug again, making it
> > "stuck" at that column.
>
> Thanks, this should be fixed now on the master branch; please test.
--
Leonardo Dagnino
Reply sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
You have taken responsibility.
(Sun, 08 Aug 2021 06:35:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Leonardo Dagnino <leodag.sch <at> gmail.com>
:
bug acknowledged by developer.
(Sun, 08 Aug 2021 06:35:01 GMT)
Full text and
rfc822 format available.
Message #16 received at 49891-done <at> debbugs.gnu.org (full text, mbox):
> From: Leonardo Dagnino <leodag.sch <at> gmail.com>
> Date: Sun, 8 Aug 2021 03:10:05 -0300
> Cc: 49891 <at> debbugs.gnu.org
>
> It is fixed indeed, tested with multiple values and seems to be
> working as expected in all cases.
>
> Thanks for the quick fix!
Thanks for testing, I'm therefore closing this bug.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 05 Sep 2021 11:24:06 GMT)
Full text and
rfc822 format available.
This bug report was last modified 3 years and 339 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.