From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Leonardo Dagnino Newsgroups: gmane.emacs.bugs Subject: bug#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 Date: Thu, 5 Aug 2021 00:32:25 -0300 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10340"; mail-complaints-to="usenet@ciao.gmane.io" To: 49891@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 05 17:01:31 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mBesE-0002T1-Ru for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 05 Aug 2021 17:01:30 +0200 Original-Received: from localhost ([::1]:59014 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mBesB-0001df-R2 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 05 Aug 2021 11:01:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35926) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mBerm-0001X9-2e for bug-gnu-emacs@gnu.org; Thu, 05 Aug 2021 11:01:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36514) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mBerl-0003Sd-Rp for bug-gnu-emacs@gnu.org; Thu, 05 Aug 2021 11:01:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mBerl-0008Or-Qg for bug-gnu-emacs@gnu.org; Thu, 05 Aug 2021 11:01:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Leonardo Dagnino Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 05 Aug 2021 15:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 49891 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.162817562232211 (code B ref -1); Thu, 05 Aug 2021 15:01:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 5 Aug 2021 15:00:22 +0000 Original-Received: from localhost ([127.0.0.1]:48056 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBer6-0008NR-ND for submit@debbugs.gnu.org; Thu, 05 Aug 2021 11:00:21 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:53432) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBU7c-0003HD-Ja for submit@debbugs.gnu.org; Wed, 04 Aug 2021 23:32:40 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52138) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mBU7c-0005TC-CQ for bug-gnu-emacs@gnu.org; Wed, 04 Aug 2021 23:32:40 -0400 Original-Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]:55042) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mBU7a-0002XU-KG for bug-gnu-emacs@gnu.org; Wed, 04 Aug 2021 23:32:40 -0400 Original-Received: by mail-wm1-x32d.google.com with SMTP id b128so2386846wmb.4 for ; Wed, 04 Aug 2021 20:32:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=MSl3BzeGTw9FcyuQr+W4yk3k4PQS806wEALMkezpW/c=; b=rdpZqS7K0eHJrdDwps4NKYf5hlnVkJjoNrKDXnlsaiZq0w+gKjBEW0vDx3N2QPKFt2 fZNiU9Pqe+eESWM2JkXjkkxe0M3+hFay0LEn+Qb0OnRhMU9pCMzoWaOSzSaaWkGAv8z2 5S7Aa1iIdlmCwgnncQFEX5Qrq1GhJc8WYfA/BRItQxZkIkvZ3YkxLpNaKgDfhjU+2z2+ 7NAlK3EHJdhtOERRj/EQgg2Im9Yy3lWicTSNVUAclgOVs9/7nLNO9SdQUfqy9FdqUeXy I73jZxXElwzGXIshUW2xXzFaKXP9GIL3kOiZ26MtlQAh/gR/uMcqb5OhcsCi6GNoFfYH zx5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=MSl3BzeGTw9FcyuQr+W4yk3k4PQS806wEALMkezpW/c=; b=XjyHb3P7MogMkhdP9aiaSyemxdISL7aFYRY+kqbjVRPJOHpV9ro53x6G1TtK5I6Hfs hPeHCMYWZI47XFSSnFN05KLdj9fwGzZnGB5+oTFIVW0xmi7x3ll/XaS0QX/7dlWJQnQW IAFiNSWozoMZZPYNlQEmJJ6hnwppakIXf+WnxfXdvkZMyU7Sg/CzOdRusBjbV1/GoSst wi+ZPBDjXHgZOh0UZ1BrSIZLSPEuuoFeG4ZJvLxe4J5L9mYICre/EeU2EYDyJt8p9C2O 1GGOeX729KGGR/1lec5pKy9vI+CNftYR/uqq6aJbvg90ThugDBaKDxfbENitIEaUJitY 1NFQ== X-Gm-Message-State: AOAM531qvLEG2wYLennIGi2T/mlHv6/ZASs6sLe6nVihd9+BtJvMsM4L a/Qs1XLXRCFbqMy4W82KisdykgAutb+ZIxedTSR/RDW3ylO+yw== X-Google-Smtp-Source: ABdhPJxzOkwhxCD9VsYatZHDrF2CHWqY5I8jUGurNXazXQx+kNoPiUvbJKl+EnfJRTzCqEPjJJ8Ru9ihi3qkbiQ2tTk= X-Received: by 2002:a1c:4e1a:: with SMTP id g26mr12579683wmh.52.1628134356197; Wed, 04 Aug 2021 20:32:36 -0700 (PDT) Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=leodag.sch@gmail.com; helo=mail-wm1-x32d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Thu, 05 Aug 2021 11:00:19 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:211240 Archived-At: 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))