unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 32848@debbugs.gnu.org, Anders Lindgren <andlind@gmail.com>,
	Allen Li <darkfeline@felesatra.moe>
Subject: bug#32848: 26.1; follow-mode cursor move breaks with frame-resize-pixelwise
Date: Fri, 28 Sep 2018 20:31:51 +0000	[thread overview]
Message-ID: <20180928203151.GB5172@ACM> (raw)
In-Reply-To: <8336tv8iv7.fsf@gnu.org>

Hello, Eli.

On Thu, Sep 27, 2018 at 11:06:20 +0300, Eli Zaretskii wrote:
> > From: Allen Li <darkfeline@felesatra.moe>
> > 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).





  reply	other threads:[~2018-09-28 20:31 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-26 22:49 bug#32848: 26.1; follow-mode cursor move breaks with frame-resize-pixelwise Allen Li
2018-09-27  6:04 ` Eli Zaretskii
2018-09-27  8:06 ` Eli Zaretskii
2018-09-28 20:31   ` Alan Mackenzie [this message]
2018-09-28 21:27     ` Eli Zaretskii
2018-09-29  8:35       ` Alan Mackenzie
2018-09-29 10:26         ` Eli Zaretskii
2018-09-29 11:25           ` Alan Mackenzie
2018-09-29 13:47             ` Eli Zaretskii
2018-09-29 13:56               ` Eli Zaretskii
2018-09-29 14:48               ` Alan Mackenzie
2018-09-29 15:06                 ` Eli Zaretskii
2018-09-29 20:25                   ` Alan Mackenzie
2018-09-30  5:30                     ` Eli Zaretskii
2018-09-30 11:16                       ` Eli Zaretskii
2018-09-30 12:16                         ` Alan Mackenzie
2018-09-30 12:56                           ` Eli Zaretskii
2018-09-30 14:09                             ` Alan Mackenzie
2018-09-30 17:00                               ` Eli Zaretskii
2018-10-01 12:33                                 ` Alan Mackenzie
2018-10-01 13:47                                   ` Eli Zaretskii
2018-10-15  9:23                                     ` Alan Mackenzie
2018-10-15 15:07                                       ` Eli Zaretskii
2018-10-15 17:26                                         ` Alan Mackenzie
2018-10-15 18:02                                           ` Eli Zaretskii
2018-09-30 11:02   ` Alan Mackenzie
2018-09-30 11:24     ` Eli Zaretskii
2018-09-30 13:55       ` Alan Mackenzie
2018-10-17 10:17   ` Alan Mackenzie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180928203151.GB5172@ACM \
    --to=acm@muc.de \
    --cc=32848@debbugs.gnu.org \
    --cc=andlind@gmail.com \
    --cc=darkfeline@felesatra.moe \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).