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#27008: 26.0.50; auto-hscroll-mode and scroll-left Date: Tue, 30 May 2017 20:31:38 +0300 Message-ID: <83a85udzet.fsf@gnu.org> References: <87shjynvwj.fsf@rosalinde> <83zie6nsip.fsf@gnu.org> <87inkunf4k.fsf@rosalinde> <83efv6e6m0.fsf@gnu.org> <87d1aq9tb6.fsf@rosalinde> <83bmqae00s.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1496165536 20467 195.159.176.226 (30 May 2017 17:32:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 30 May 2017 17:32:16 +0000 (UTC) Cc: 27008@debbugs.gnu.org To: stephen.berman@gmx.net Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue May 30 19:32:12 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 1dFl06-00058h-PF for geb-bug-gnu-emacs@m.gmane.org; Tue, 30 May 2017 19:32:10 +0200 Original-Received: from localhost ([::1]:55513 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dFl0B-0006IY-Ve for geb-bug-gnu-emacs@m.gmane.org; Tue, 30 May 2017 13:32:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58534) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dFl02-0006Hx-KN for bug-gnu-emacs@gnu.org; Tue, 30 May 2017 13:32:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dFkzy-0001KP-Jg for bug-gnu-emacs@gnu.org; Tue, 30 May 2017 13:32:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:42962) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dFkzy-0001K8-Gs for bug-gnu-emacs@gnu.org; Tue, 30 May 2017 13:32:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dFkzy-0007JQ-8U for bug-gnu-emacs@gnu.org; Tue, 30 May 2017 13:32: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: Tue, 30 May 2017 17:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27008 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 27008-submit@debbugs.gnu.org id=B27008.149616550228080 (code B ref 27008); Tue, 30 May 2017 17:32:02 +0000 Original-Received: (at 27008) by debbugs.gnu.org; 30 May 2017 17:31:42 +0000 Original-Received: from localhost ([127.0.0.1]:45639 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFkzd-0007Iq-TI for submit@debbugs.gnu.org; Tue, 30 May 2017 13:31:42 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:38807) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFkzc-0007Id-Qy for 27008@debbugs.gnu.org; Tue, 30 May 2017 13:31:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dFkzT-000160-Hp for 27008@debbugs.gnu.org; Tue, 30 May 2017 13:31:35 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:52443) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dFkzT-00015t-FJ; Tue, 30 May 2017 13:31:31 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3433 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dFkzS-0007g2-Pv; Tue, 30 May 2017 13:31:31 -0400 In-reply-to: <83bmqae00s.fsf@gnu.org> (message from Eli Zaretskii on Tue, 30 May 2017 20:18:27 +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: 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:133057 Archived-At: > Date: Tue, 30 May 2017 20:18:27 +0300 > From: Eli Zaretskii > Cc: 27008@debbugs.gnu.org > > > From: Stephen Berman > > Cc: 27008@debbugs.gnu.org > > Date: Tue, 30 May 2017 18:57:01 +0200 > > > > Thanks very much for pursuing this. I updated my master branch, applied > > your patch and rebuilt, but when I executed the recipe of my OP, I saw > > the same effect with the patch as without it: only the current line > > respects w->min_hscroll, the other are displayed from BOL. I'd be happy > > to try and help diagnose this further, if you can advise me what to do. > > I don't have any advice, because your recipe worked for me after the > changes. I'm confused now. Ah, I see: I sent the wrong patch. Here's the right one: diff --git a/src/xdisp.c b/src/xdisp.c index ddb26b8..3ccd035 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -2890,8 +2890,19 @@ init_iterator (struct it *it, struct window *w, } else { + /* When hscrolling only the current line, don't apply the + hscroll here, it will be applied by display_line when it gets + to laying out the line showing point. However, if the + window's min_hscroll is positive, the user specified a lower + bound for automatic hscrolling, so they expect the + non-current lines to obey that hscroll amount. */ if (hscrolling_current_line_p (w)) - it->first_visible_x = 0; + { + if (w->min_hscroll > 0) + it->first_visible_x = w->min_hscroll * FRAME_COLUMN_WIDTH (it->f); + else + it->first_visible_x = 0; + } else it->first_visible_x = window_hscroll_limited (w, it->f) * FRAME_COLUMN_WIDTH (it->f);