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 17:56:07 +0300 Message-ID: <83efv6e6m0.fsf@gnu.org> References: <87shjynvwj.fsf@rosalinde> <83zie6nsip.fsf@gnu.org> <87inkunf4k.fsf@rosalinde> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1496156246 7140 195.159.176.226 (30 May 2017 14:57:26 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 30 May 2017 14:57:26 +0000 (UTC) Cc: 27008@debbugs.gnu.org To: Stephen Berman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue May 30 16:57: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 1dFiaC-0001W1-8i for geb-bug-gnu-emacs@m.gmane.org; Tue, 30 May 2017 16:57:16 +0200 Original-Received: from localhost ([::1]:54317 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dFiaH-0000je-RN for geb-bug-gnu-emacs@m.gmane.org; Tue, 30 May 2017 10:57:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33436) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dFia1-0000YB-Ig for bug-gnu-emacs@gnu.org; Tue, 30 May 2017 10:57:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dFiZy-0001Ev-Gj for bug-gnu-emacs@gnu.org; Tue, 30 May 2017 10:57:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:42719) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dFiZy-0001Eo-Cv for bug-gnu-emacs@gnu.org; Tue, 30 May 2017 10:57:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dFiZy-0006cU-7G for bug-gnu-emacs@gnu.org; Tue, 30 May 2017 10:57: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 14:57: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.149615617225372 (code B ref 27008); Tue, 30 May 2017 14:57:02 +0000 Original-Received: (at 27008) by debbugs.gnu.org; 30 May 2017 14:56:12 +0000 Original-Received: from localhost ([127.0.0.1]:45391 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFiZA-0006b9-54 for submit@debbugs.gnu.org; Tue, 30 May 2017 10:56:12 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:42100) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFiZ7-0006aw-W9 for 27008@debbugs.gnu.org; Tue, 30 May 2017 10:56:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dFiYz-0000xB-Qn for 27008@debbugs.gnu.org; Tue, 30 May 2017 10:56:04 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:49576) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dFiYz-0000x4-NS; Tue, 30 May 2017 10:56:01 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2532 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dFiYy-0006ay-TZ; Tue, 30 May 2017 10:56:01 -0400 In-reply-to: <87inkunf4k.fsf@rosalinde> (message from Stephen Berman on Sun, 21 May 2017 22:12:27 +0200) 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:133052 Archived-At: > From: Stephen Berman > Cc: 27008@debbugs.gnu.org > Date: Sun, 21 May 2017 22:12:27 +0200 > > Why can't the other lines be displayed with hscroll set to > w->min_hscroll, as they are with auto-hscroll-mode set to t? Thanks, I've tried to implement this idea in the attached. I won't have enough time to test it, though, so please run with this applied for a few days and see if there are any adverse effects. If not, I will push this. diff --git a/src/xdisp.c b/src/xdisp.c index ddb26b8..898eb6b 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; + else + it->first_visible_x = 0; + } else it->first_visible_x = window_hscroll_limited (w, it->f) * FRAME_COLUMN_WIDTH (it->f);