From: Eli Zaretskii <eliz@gnu.org>
To: Steven Allen <steven@stebalien.com>
Cc: luangruo@yahoo.com, 72323@debbugs.gnu.org, storm@cua.dk
Subject: bug#72323: 31.0.50; line-move unconditionally resets vscroll to 0
Date: Sun, 18 Aug 2024 22:01:46 +0300 [thread overview]
Message-ID: <86r0aly7s5.fsf@gnu.org> (raw)
In-Reply-To: <871q2l3c9h.fsf@stebalien.com> (message from Steven Allen on Sun, 18 Aug 2024 11:40:42 -0700)
> From: Steven Allen <steven@stebalien.com>
> Cc: luangruo@yahoo.com, 72323@debbugs.gnu.org, storm@cua.dk
> Date: Sun, 18 Aug 2024 11:40:42 -0700
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> >> From: Steven Allen <steven@stebalien.com>
> >> Cc: luangruo@yahoo.com, 72323@debbugs.gnu.org, storm@cua.dk
> >> Date: Sun, 18 Aug 2024 10:38:29 -0700
> >>
> >> Eli Zaretskii <eliz@gnu.org> writes:
> >>
> >> > Once again: the vscroll value is pertinent only for the screen line
> >> > for which it was computed, because the way it is computed uses the
> >> > metrics of that line. Once you move to another line, the value is no
> >> > longer pertinent.
> >>
> >> Let's be precise about "move to another line":
> >>
> >> - When window-start changes, vscroll becomes invalid because the lines at
> >> the top of the screen (to which vscroll applies) has changed. I agree
> >> that it must be reset in this case.
> >> - When point is moved up and down in such a way that window-start isn't
> >> changed, vscroll is still perfectly valid as the top line in the
> >> window hasn't changed.
> >
> > I disagree. When point moves to another screen line without moving
> > window-start, vscroll may or may not be valid. Whether it is depends
> > on the details of what is on display.
>
> Can you give me an example example where moving point invalidates
> vscroll (except when point would move partially or fully off screen)?
Why isn't the one example I gave enough?
The code in question doesn't know whether this is or isn't the case,
at least not in all cases and not without a lot of tedious layout
calculations. Whether the current line will be fully visible is only
known after the window is redisplayed. At which time we also check
that we didn't enter the scroll margins and other conditions that
require to scroll the window. Keeping the vscroll would make all this
much more complicated, so we play it safe.
next prev parent reply other threads:[~2024-08-18 19:01 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-27 17:57 bug#72323: 31.0.50; line-move unconditionally resets vscroll to 0 Steven Allen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-27 18:11 ` Eli Zaretskii
2024-07-27 20:10 ` Steven Allen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-28 4:50 ` Eli Zaretskii
2024-07-28 20:07 ` Steven Allen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-28 20:10 ` Steven Allen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-29 11:14 ` Eli Zaretskii
2024-07-29 11:12 ` Eli Zaretskii
2024-07-29 14:30 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-18 17:42 ` Steven Allen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-18 17:38 ` Steven Allen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-18 18:21 ` Eli Zaretskii
2024-08-18 18:40 ` Steven Allen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-18 19:01 ` Eli Zaretskii [this message]
2024-08-18 22:17 ` Steven Allen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-19 11:06 ` Eli Zaretskii
2024-08-19 17:30 ` Steven Allen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-30 0:51 ` Stefan Kangas
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=86r0aly7s5.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=72323@debbugs.gnu.org \
--cc=luangruo@yahoo.com \
--cc=steven@stebalien.com \
--cc=storm@cua.dk \
/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.