Subject: 30.0.50; (recenter 0 t) does not put point on top of the window
From: Ihor Radchenko <[email-masked]>
To: [email-masked]
Date: Sun, 14 Apr 2024 16:33:48 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

Consider the following reproducer:

1. emacs -Q
2. Insert the following into scratch buffer and put point at "recenter"

(progn
  (require 'pixel-scroll)
  (pixel-scroll-precision-interpolate
   (* -1 (line-pixel-height)
      (max 0 (- (count-screen-lines (window-start) (point)) 2)))
   nil 1)
  ;; Call original recenter for final adjustment.
  (recenter 0 t))

3. M-x eval-buffer
4. Observe that scroll is not set to line 0, despite calling `recenter'

Changing (recenter 0 t) to (recenter 1 t) makes scrolling work as
expected.

This is on the latest master. I started seeing it only today, after
pulling the latest main.

In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 3.24.41, cairo version 1.18.0) of 2024-04-14 built on localhost
Repository revision: 99c86454cdd2720dd23393e4ffd94f8d27b784ca
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101011
System Description: Gentoo Linux

Configured using:
 'configure 'CFLAGS= -g3'
 JAVAC=/etc/java-config-2/current-system-vm/bin/javac'

-- 
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>