From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#32848: 26.1; follow-mode cursor move breaks with frame-resize-pixelwise Date: Fri, 28 Sep 2018 20:31:51 +0000 Message-ID: <20180928203151.GB5172@ACM> References: <8336tv8iv7.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1538166966 8738 195.159.176.226 (28 Sep 2018 20:36:06 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 28 Sep 2018 20:36:06 +0000 (UTC) User-Agent: Mutt/1.10.1 (2018-07-13) Cc: 32848@debbugs.gnu.org, Anders Lindgren , Allen Li To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Sep 28 22:36:02 2018 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 1g5zUW-00027D-OO for geb-bug-gnu-emacs@m.gmane.org; Fri, 28 Sep 2018 22:36:00 +0200 Original-Received: from localhost ([::1]:45767 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g5zWd-0001xs-FK for geb-bug-gnu-emacs@m.gmane.org; Fri, 28 Sep 2018 16:38:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45755) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g5zWX-0001xc-PD for bug-gnu-emacs@gnu.org; Fri, 28 Sep 2018 16:38:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g5zWU-00054i-HQ for bug-gnu-emacs@gnu.org; Fri, 28 Sep 2018 16:38:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:53783) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g5zWU-00054c-DF for bug-gnu-emacs@gnu.org; Fri, 28 Sep 2018 16:38:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1g5zWU-0005JA-A9 for bug-gnu-emacs@gnu.org; Fri, 28 Sep 2018 16:38:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 28 Sep 2018 20:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32848 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 32848-submit@debbugs.gnu.org id=B32848.153816704220351 (code B ref 32848); Fri, 28 Sep 2018 20:38:02 +0000 Original-Received: (at 32848) by debbugs.gnu.org; 28 Sep 2018 20:37:22 +0000 Original-Received: from localhost ([127.0.0.1]:58041 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g5zVp-0005IA-L1 for submit@debbugs.gnu.org; Fri, 28 Sep 2018 16:37:21 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:34719 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1g5zVo-0005I2-D7 for 32848@debbugs.gnu.org; Fri, 28 Sep 2018 16:37:20 -0400 Original-Received: (qmail 67874 invoked by uid 3782); 28 Sep 2018 20:37:19 -0000 Original-Received: from acm.muc.de (p5B146F39.dip0.t-ipconnect.de [91.20.111.57]) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 28 Sep 2018 22:37:17 +0200 Original-Received: (qmail 27706 invoked by uid 1000); 28 Sep 2018 20:31:51 -0000 Content-Disposition: inline In-Reply-To: <8336tv8iv7.fsf@gnu.org> X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de 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:150742 Archived-At: Hello, Eli. On Thu, Sep 27, 2018 at 11:06:20 +0300, Eli Zaretskii wrote: > > From: Allen Li > > Date: Wed, 26 Sep 2018 15:49:15 -0700 > > Moving the cursor off the bottom of the window with follow-mode enabled > > doesn't move to the other window properly if frame-resize-pixelwise is > > set and a partial line is visible. > It seems like setting make-cursor-line-fully-visible to nil solves the > problem. Could you try that for a while, and see if this has any > adverse effects? > Alan and Anders: does setting this variable to nil in buffers under > follow-mode sounds like an okay solution? It might mean that in some > rare cases the user will see the current line only partially (only in > the last window in the group). If you think this is OK, we could > arrange for that variable to be set locally as part of turning on > follow-mode. > A more complex solution would be to allow > make-cursor-line-fully-visible have a value that is a function, which > follow-mode will define in a way that will only allow > partially-visible current line in a window if it is not the last one > in the order returned by follow-all-followers. > Comments? The cause of this is this: (i) The C-n moves point from the last full line of LH window (L33) to partial line in LH window (L34). (ii) Follow Mode's post-command-hook determines that point should move to the RH window, and sets up the windows correctly for this. (iii) To try to avoid the LH window scrolling, follow mode does this (at follow-adjust-window L+94: ;; If a new window was selected, make sure that the old is ;; not scrolled when point is outside the window. (unless (eq win (selected-window)) (let ((p (window-point win))) (set-window-start win (window-start win) nil) (set-window-point win p)))) Here, `win' is the LH window. It specifically calls set-window-start with a nil NO-FORCE argument to try to ensure the redisplay will move point into the window rather than scrolling the window to include point. (iv) Redisplay sees w->force_start true and make_cursor_line_fully_visible_p also true. These conflict with eachother here. Priority is given to make_cursor_...._p. Why does w->force_start not have priority here? -- Alan Mackenzie (Nuremberg, Germany).