From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: charles@aurox.ch (Charles A. Roelli) Newsgroups: gmane.emacs.bugs Subject: bug#29325: 26.0.90: Info scrolling stuck Date: Thu, 23 Nov 2017 21:08:45 +0100 Message-ID: References: <83fu9ehuog.fsf@gnu.org> <83d14hidlk.fsf@gnu.org> <83r2sudwgv.fsf@gnu.org> <83r2ssd7eq.fsf@gnu.org> <837eujcta4.fsf@gnu.org> <83r2sqb9xp.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1511467691 14067 195.159.176.226 (23 Nov 2017 20:08:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 23 Nov 2017 20:08:11 +0000 (UTC) Cc: 29325@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Nov 23 21:08:07 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 1eHxn3-0003Dp-PN for geb-bug-gnu-emacs@m.gmane.org; Thu, 23 Nov 2017 21:08:06 +0100 Original-Received: from localhost ([::1]:45905 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHxnB-0003t5-2r for geb-bug-gnu-emacs@m.gmane.org; Thu, 23 Nov 2017 15:08:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55748) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHxn5-0003sz-78 for bug-gnu-emacs@gnu.org; Thu, 23 Nov 2017 15:08:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eHxn0-00008Y-Bh for bug-gnu-emacs@gnu.org; Thu, 23 Nov 2017 15:08:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45497) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eHxn0-000088-7y for bug-gnu-emacs@gnu.org; Thu, 23 Nov 2017 15:08:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eHxmz-0007wu-Tz for bug-gnu-emacs@gnu.org; Thu, 23 Nov 2017 15:08:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: charles@aurox.ch (Charles A. Roelli) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 23 Nov 2017 20:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29325 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 29325-submit@debbugs.gnu.org id=B29325.151146765430519 (code B ref 29325); Thu, 23 Nov 2017 20:08:01 +0000 Original-Received: (at 29325) by debbugs.gnu.org; 23 Nov 2017 20:07:34 +0000 Original-Received: from localhost ([127.0.0.1]:54178 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eHxmX-0007wA-R7 for submit@debbugs.gnu.org; Thu, 23 Nov 2017 15:07:34 -0500 Original-Received: from sinyavsky.aurox.ch ([37.35.109.145]:51167) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eHxmU-0007vr-02 for 29325@debbugs.gnu.org; Thu, 23 Nov 2017 15:07:30 -0500 Original-Received: from sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) by sinyavsky.aurox.ch (Postfix) with ESMTP id 0DA10225D3 for <29325@debbugs.gnu.org>; Thu, 23 Nov 2017 20:00:07 +0000 (UTC) Authentication-Results: sinyavsky.aurox.ch (amavisd-new); dkim=pass (1024-bit key) reason="pass (just generated, assumed good)" header.d=aurox.ch DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aurox.ch; h= references:subject:subject:in-reply-to:to:from:from:message-id :date:date; s=dkim; t=1511467205; x=1512331206; bh=ddLINdbakbJJd uoAHPdPf365N1Lijo2w6X3454K2ieI=; b=r7yUmqIo/MsmR8097Wc4StBYq1zYB B1OorJtxVQ2j2tZw33eE0qRx26VJ+FJGEe2mbwJi88AB2lcU6PCaXeBumqvoLKNo Ad1pPLUQO3QAKf74BoMw6k7/FLNEHLYYOh1XA1o+RhZQgT4suhGlHEEc+xT8nm1t Bq1ObtbwzF1DGA= X-Virus-Scanned: Debian amavisd-new at test.virtualizor.com Original-Received: from sinyavsky.aurox.ch ([127.0.0.1]) by sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 2GoNBJ4hTuO0 for <29325@debbugs.gnu.org>; Thu, 23 Nov 2017 20:00:05 +0000 (UTC) Original-Received: from gray (125.85.192.178.dynamic.wline.res.cust.swisscom.ch [178.192.85.125]) by sinyavsky.aurox.ch (Postfix) with ESMTPSA id 97EB8225BC; Thu, 23 Nov 2017 20:00:05 +0000 (UTC) In-reply-to: <83r2sqb9xp.fsf@gnu.org> (message from Eli Zaretskii on Wed, 22 Nov 2017 17:38:26 +0200) 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:140272 Archived-At: > Date: Wed, 22 Nov 2017 17:38:26 +0200 > From: Eli Zaretskii > > > > try_to_scroll looks like this: > > > > I suspect we shouldn't go there in this case. > > Actually, I think this code is not supposed to run in the case you > describe, i.e. when the user invokes a scrolling command. So I think > the root cause is elsewhere. Does the patch below fix the problem? > > diff --git a/src/window.c b/src/window.c > index 7f47252..504dcd3 100644 > --- a/src/window.c > +++ b/src/window.c > @@ -5355,6 +5355,9 @@ window_scroll_pixel_based (Lisp_Object window, int n, bool whole, bool noerror) > /* We moved the window start towards BEGV, so PT may be now > in the scroll margin at the bottom. */ > move_it_to (&it, PT, -1, > + /* We subtract WINDOW_HEADER_LINE_HEIGHT because > + it.y is relative to the bottom of the header > + line, see above. */ > (it.last_visible_y - WINDOW_HEADER_LINE_HEIGHT (w) > - partial_line_height (&it) - this_scroll_margin - 1), > -1, > @@ -5392,11 +5395,14 @@ window_scroll_pixel_based (Lisp_Object window, int n, bool whole, bool noerror) > > /* See if point is on a partially visible line at the end. */ > if (it.what == IT_EOB) > - partial_p = it.current_y + it.ascent + it.descent > it.last_visible_y; > + partial_p = > + it.current_y + it.ascent + it.descent > + > it.last_visible_y - WINDOW_HEADER_LINE_HEIGHT (w); > else > { > move_it_by_lines (&it, 1); > - partial_p = it.current_y > it.last_visible_y; > + partial_p = > + it.current_y > it.last_visible_y - WINDOW_HEADER_LINE_HEIGHT (w); > } > > if (charpos == PT && !partial_p > @@ -5415,7 +5421,7 @@ window_scroll_pixel_based (Lisp_Object window, int n, bool whole, bool noerror) > goal_y = this_scroll_margin; > SET_TEXT_POS_FROM_MARKER (start, w->start); > start_display (&it, w, start); > - /* It would be wrong to subtract CURRENT_HEADER_LINE_HEIGHT > + /* It would be wrong to subtract WINDOW_HEADER_LINE_HEIGHT > here because we called start_display again and did not > alter it.current_y this time. */ > move_it_to (&it, -1, window_scroll_pixel_based_preserve_x, I can confirm that it does fix the issue on GNU/Linux. Thanks again for your help here.