Subject: bug#70386: 30.0.50; (recenter 0 t) does not put point on top of the window

From: Ihor Radchenko <[email-masked]>
Date: Mon, 29 Apr 2024 18:31:19 +0000

Po Lu <[email-masked]> writes:

> Po Lu <[email-masked]> writes:
>
>> Eli Zaretskii <[email-masked]> writes:
>>
>>> Ping!  Po Lu, could you please look into this issue?
>>
>> I will, thanks.
>
> Should be fixed now, please test and ack.

I just tried the latest master (make bootstrap).
I am still able to reproduce the original steps, although not every time
I run M-x eval-buffer.

(progn
  (require 'pixel-scroll)
  (pixel-scroll-precision-interpolate
   (* -1 (line-pixel-height)
      (max 0 (- (count-screen-lines (window-start) (point)) 2)))

^^^ changing 2 to 3,4,5 or resizing frame changes the scrolling
behavior. Sometimes, the recentering does leave the point on top, but
the point moves down a few lines. Sometimes, recentering does not happen
as in the original report. Sometimes, the recentering works.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>