GNU bug report logs - #32848
26.1; follow-mode cursor move breaks with frame-resize-pixelwise

Previous Next

Package: emacs;

Reported by: Allen Li <darkfeline <at> felesatra.moe>

Date: Wed, 26 Sep 2018 23:07:01 UTC

Severity: normal

Merged with 8390, 8413

Found in versions 23.3, 26.1

Done: Alan Mackenzie <acm <at> muc.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Alan Mackenzie <acm <at> muc.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 32848 <at> debbugs.gnu.org, andlind <at> gmail.com, darkfeline <at> felesatra.moe
Subject: bug#32848: 26.1; follow-mode cursor move breaks with frame-resize-pixelwise
Date: Sat, 29 Sep 2018 08:35:51 +0000
Hello, Eli.

On Sat, Sep 29, 2018 at 00:27:11 +0300, Eli Zaretskii wrote:
> > Date: Fri, 28 Sep 2018 20:31:51 +0000
> > Cc: Allen Li <darkfeline <at> felesatra.moe>, Anders Lindgren <andlind <at> gmail.com>,
> >   32848 <at> debbugs.gnu.org
> > From: Alan Mackenzie <acm <at> muc.de>

> > (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?

> Because by default we don't want to show the cursor in a partial line,
> ever: such a line might not be legible.  Over the years, more and more
> rare use cases were reported where such a situation happens, and we
> fixed them one by one.  Evidently, this is the popular demand.

OK.

> Follow-mode is special in this regard, because with it, showing a
> partial line is not a flaw, as that same line will be fully visible in
> the next window, and follow-mode actually switches to that next
> window.  So we need to tell the display engine to behave specially in
> this case.  I suggested 2 ways of doing that, the simple one actually
> does what you expected, i.e. the force_start flag will win.

This feels a bit like a workaround: there is a last follow mode window
where the cursor, if it ends up in the last line, doesn't have a next
window to move to.  Also, the user can change
make-cursor-line-fully-visible at any time, unlikely though this is.

I propose the following solution: at the critical piece of code in
follow mode's post-command-hook, follow mode should check
make-cursor-...-p, and if non-nil, determine, using
pos-visible-in-window-p whether the cursor is in the last partial line.
If so, move it one line higher.  In follow-mode, the positions of point
in the non-selected windows are fairly random anyway.

As an aside, make-cursor-...-p doesn't appear in either the Emacs manual
or the Elisp manual, and the documentation for set-window-position
doesn't mention it.  I can feel a documentation writing urge coming on.

-- 
Alan Mackenzie (Nuremberg, Germany).




This bug report was last modified 6 years and 249 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.