all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: luangruo@yahoo.com, mwd@md5i.com, emacs-devel@gnu.org
Subject: Re: Redisplay resets vscroll when window start changes
Date: Wed, 17 Nov 2021 15:40:06 +0200	[thread overview]
Message-ID: <83o86izyrt.fsf@gnu.org> (raw)
In-Reply-To: <jwv5ysrpiao.fsf-monnier+emacs@gnu.org> (message from Stefan Monnier on Tue, 16 Nov 2021 22:40:35 -0500)

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: Po Lu <luangruo@yahoo.com>,  mwd@md5i.com,  emacs-devel@gnu.org
> Date: Tue, 16 Nov 2021 22:40:35 -0500
> 
> I'm still not sure how/why line-move should affect vscroll.

Because it needs to handle the case of scrolling through a very tall
image.  When that scrolling shows the last (bottom-most) portion of
the image, the next C-n should go to the next screen line, and that
means zero out the vscroll.  Conversely, when we show only the upper
portion of the image, the next C-n should increase vscroll to show its
lower portions.

> AFAIK while line-move does use some of the redisplay code, in theory at
> least its effect should only ever be to move point (i.e. when called
> within a `save-excursion` it should end up having no effect at all).

If you only move point, but leave vscroll at zero, you will never be
able to show the parts of the image that exceed the window's height.

> Would there be a way to distinguish the case where line-move can return
> a correct result without changing vscroll, from the case where it does
> require changing vscroll in order to find its answer?

I don't think I understand the question.  It might be worthwhile to
keep in mind that the display engine (almost) never changes vscroll,
so if you want it to show a large object at some position, you must
manipulate vscroll from Lisp.



  reply	other threads:[~2021-11-17 13:40 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87k0h9pp7t.fsf.ref@yahoo.com>
2021-11-15 12:39 ` Redisplay resets vscroll when window start changes Po Lu
2021-11-15 12:44   ` Po Lu
2021-11-15 14:18   ` Eli Zaretskii
2021-11-16  0:02     ` Po Lu
2021-11-16 12:51       ` Eli Zaretskii
2021-11-16 12:54         ` Po Lu
2021-11-16 13:01           ` Po Lu
2021-11-16 13:34             ` Eli Zaretskii
2021-11-16 13:38               ` Po Lu
2021-11-16 13:45                 ` Eli Zaretskii
2021-11-16 17:12                   ` Michael Welsh Duggan
2021-11-16 18:31                     ` Eli Zaretskii
2021-11-17  3:24                       ` Stefan Monnier
2021-11-17 13:34                         ` Eli Zaretskii
2021-11-17  0:26                     ` Po Lu
2021-11-17  3:31                       ` Eli Zaretskii
2021-11-17  3:40                         ` Stefan Monnier
2021-11-17 13:40                           ` Eli Zaretskii [this message]
2021-11-17 20:40                             ` Stefan Monnier
2021-11-18  6:36                               ` Eli Zaretskii
2021-11-19  3:17                                 ` Stefan Monnier
2021-11-19  7:13                                   ` Eli Zaretskii
2021-11-19 18:07                                     ` Stefan Monnier
2021-11-19 18:43                                       ` Eli Zaretskii
2021-11-17  4:31                         ` Po Lu
2021-11-17  7:45                           ` Eli Zaretskii
2021-11-17  0:21                   ` Po Lu

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

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

  git send-email \
    --in-reply-to=83o86izyrt.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=luangruo@yahoo.com \
    --cc=monnier@iro.umontreal.ca \
    --cc=mwd@md5i.com \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.