emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Redisplay resets vscroll when window start changes


From: Stefan Monnier
Subject: Re: Redisplay resets vscroll when window start changes
Date: Tue, 16 Nov 2021 22:40:35 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Eli Zaretskii [2021-11-17 05:31:00] wrote:
> My suggestion is to implement equivalents of C-n/C-p that do what you
> want, instead of asking for previous/next-line to be able to preserve
> the vscroll, because those commands aren't supposed to support the use
> case you want to support.

[ I feel somewhat responsible for this mess, since IIRC I was the one
  who first tried to write a line-move that preserves the pixel-column,
  by using the redisplay iterator code, without understand very much of
  what it does or how it works.  ]

I'm still not sure how/why line-move should affect vscroll.
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).

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?


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]