From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#29002: it.first_visible_x is erroneously 0 while horizontal scrolling. Date: Thu, 26 Oct 2017 07:51:55 +0300 Message-ID: <6B22B365-3C27-4B26-93E0-F1027FA6CF50@gnu.org> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1508993605 15650 195.159.176.226 (26 Oct 2017 04:53:25 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 26 Oct 2017 04:53:25 +0000 (UTC) User-Agent: K-9 Mail for Android To: 29002@debbugs.gnu.org, esq@lawlist.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 26 06:53:21 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7aAQ-0003Jj-KB for geb-bug-gnu-emacs@m.gmane.org; Thu, 26 Oct 2017 06:53:18 +0200 Original-Received: from localhost ([::1]:50927 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7aAW-0007bB-HM for geb-bug-gnu-emacs@m.gmane.org; Thu, 26 Oct 2017 00:53:24 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46660) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7aAD-0007RE-40 for bug-gnu-emacs@gnu.org; Thu, 26 Oct 2017 00:53:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e7aAA-0004WK-HJ for bug-gnu-emacs@gnu.org; Thu, 26 Oct 2017 00:53:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:53393) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e7aAA-0004WC-DP for bug-gnu-emacs@gnu.org; Thu, 26 Oct 2017 00:53:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e7aAA-0001EI-6E for bug-gnu-emacs@gnu.org; Thu, 26 Oct 2017 00:53: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: Thu, 26 Oct 2017 04:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29002 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org, Keith David Bershatsky , 29002@debbugs.gnu.org Original-Received: via spool by 29002-submit@debbugs.gnu.org id=B29002.15089935524681 (code B ref 29002); Thu, 26 Oct 2017 04:53:02 +0000 Original-Received: (at 29002) by debbugs.gnu.org; 26 Oct 2017 04:52:32 +0000 Original-Received: from localhost ([127.0.0.1]:33840 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7a9g-0001DR-Gw for submit@debbugs.gnu.org; Thu, 26 Oct 2017 00:52:32 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:55607) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7a9f-0001DF-BD for 29002@debbugs.gnu.org; Thu, 26 Oct 2017 00:52:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e7a9X-00046E-77 for 29002@debbugs.gnu.org; Thu, 26 Oct 2017 00:52:26 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:51101) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7a9D-0003hk-BL; Thu, 26 Oct 2017 00:52:03 -0400 Original-Received: from [176.13.20.13] (port=62099 helo=[10.131.107.128]) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1e7a9C-0007Tn-Cl; Thu, 26 Oct 2017 00:52:03 -0400 In-Reply-To: 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: 208.118.235.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:138992 Archived-At: On October 26, 2017 6:45:57 AM GMT+03:00, Keith David Bershatsky wrote: > Here is a link to a screen-shot depicting #29002: >=20 > https://www=2Elawlist=2Ecom/images/bug_hscl=2Epng This is not a bug; your expectations are incorrect=2E To see why, modify = your recipe to omit the "scroll right" part (step 5)=2E You will see that bug-= hscroll reports zero=2E When hscrolling only the current line, first_visible_x is set to zero, to reflect the situation for the non-current lines, which are normally not hscrolled=2E However, if you invoke scroll-right, the non-current lines become hscrolled, so you see a non-zero value of first_visible_x=2E In addition, the manual hscroll temporarily disables auto-hscrolling, and moving cursor re-enables it, which is why gou see the value reset to zero=2E Yes, it's complicated=2E=2E=2E I'm not sure why you expected non-zero values in this case, but if you want to identify this situation, use the function hscrolling_current_line_p=2E Or just calculate the value yourself using w->hscroll=2E