GNU bug report logs -
#72323
31.0.50; line-move unconditionally resets vscroll to 0
Previous Next
Reported by: Steven Allen <steven <at> stebalien.com>
Date: Sat, 27 Jul 2024 17:59:02 UTC
Severity: normal
Found in version 31.0.50
Done: Stefan Kangas <stefankangas <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> Cc: "Kim F. Storm" <storm <at> cua.dk>
> Date: Sat, 27 Jul 2024 10:57:44 -0700
> From: Steven Allen via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>
> Fixing home/end (beginning of line, end of line) case seems trivial:
> don't call `line-move' in these cases (or have `line-move' short-circuit
> when `arg' is 0). However, even after reading all the comments about
> scrolling images, I'm still not sure why it's necessary to reset vscroll
> to 0.
Because otherwise what line-move does cannot be described in sensible
terms. If vscroll is not reset, then what would be the reference for
such a "line move"? By its very definition, line-move moves N screen
lines wrt the line which was its starting point, but with vscroll
non-zero that starting point could be anywhere.
In addition, when we move to another screen line, the value of vscroll
cannot be meaningfully kept, because its meaning is tightly coupled to
the screen line where it was applied. In essence, vscroll is a trick
to allow display of a tall display element (image, text using a large
fonts, etc.) in a window whose height is too small to show all of the
display element at once.
> After commenting this line out, I can't tell a difference, even
> when scrolling images with and without `auto-window-vscroll' and
> `try-vscroll'.
line-move is not just for scrolling across images, it is also about
scrolling across tall text lines and other display elements. In any
case, asking for removal of that reset is a non-starter, for the
reasons explained above, so it isn't going to happen. The solution
for any Lisp program that doesn't want vscroll to be rest is not to
call line-move.
> I was hoping Kim could shed some light on this.
I'd be thrilled to hear from Kim, but I'm as guilty of the code in
line-move as he is, so "blame" me if you want.
This bug report was last modified 235 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.