From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#37848: 27.0.50; hl-line and line-numbers out of sync Date: Mon, 21 Oct 2019 13:16:59 +0300 Message-ID: <83wocy2yjo.fsf@gnu.org> References: Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="117846"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 37848@debbugs.gnu.org To: Andrey Orst Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 21 12:18:17 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iMUlS-000UVc-BL for geb-bug-gnu-emacs@m.gmane.org; Mon, 21 Oct 2019 12:18:14 +0200 Original-Received: from localhost ([::1]:37212 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iMUlR-0000Qy-9W for geb-bug-gnu-emacs@m.gmane.org; Mon, 21 Oct 2019 06:18:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41648) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iMUlH-0000Qc-Pc for bug-gnu-emacs@gnu.org; Mon, 21 Oct 2019 06:18:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iMUlG-0006cE-Ni for bug-gnu-emacs@gnu.org; Mon, 21 Oct 2019 06:18:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46933) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iMUlG-0006c8-EL for bug-gnu-emacs@gnu.org; Mon, 21 Oct 2019 06:18:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iMUlG-0005Jn-9W for bug-gnu-emacs@gnu.org; Mon, 21 Oct 2019 06:18:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 21 Oct 2019 10:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37848 X-GNU-PR-Package: emacs Original-Received: via spool by 37848-submit@debbugs.gnu.org id=B37848.157165303620380 (code B ref 37848); Mon, 21 Oct 2019 10:18:02 +0000 Original-Received: (at 37848) by debbugs.gnu.org; 21 Oct 2019 10:17:16 +0000 Original-Received: from localhost ([127.0.0.1]:55754 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iMUkV-0005Ie-I5 for submit@debbugs.gnu.org; Mon, 21 Oct 2019 06:17:15 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:60682) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iMUkT-0005IO-33 for 37848@debbugs.gnu.org; Mon, 21 Oct 2019 06:17:14 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:34647) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iMUkN-0006Mz-W1; Mon, 21 Oct 2019 06:17:08 -0400 Original-Received: from [176.228.60.248] (port=1701 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iMUkN-00034l-3M; Mon, 21 Oct 2019 06:17:07 -0400 In-reply-to: (message from Andrey Orst on Mon, 21 Oct 2019 11:27:58 +0300) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:169894 Archived-At: > From: Andrey Orst > Date: Mon, 21 Oct 2019 11:27:58 +0300 > > emacs -q --eval "(progn > (hl-line-mode t) > (set-face-attribute 'line-number-current-line nil :foreground \"#FF0000\") > (display-line-numbers-mode t) > (split-window-right) > (switch-to-buffer \"*Messages*\"))" > > This will open two windows, one with *scratch* and other with *Messages* > buffer. Try pasting some long text into the *scratch* buffer, and > scrolling with mouse wheel. The current line number and hl-line > highlighting should be in sync. > > Then focus window with *Messages* buffer, and try scrolling in *scratch* > buffer again with mouse wheel. You'll notice that after scrolling the view > beyond the point, current line number remains correct, while hl-line highlighter > doesn't move: > > image.png > > It looks like, while Emacs always keeps the point in the view, hl-line > acts like editors that alow point to leave the view, but only when > buffer is not in focus. The problem is with hl-line mode: it doesn't move its overlay when point moves due to redisplay keeping it in the viewport. The line-number display has nothing to do with this, it works correctly in this case. Thanks.