I'm interested in the region of a buffer that is visible on-screen.
How do you get the current scroll position of a buffer? I.e. the line number of the topmost line in the viewable area? (Given that I can use window-height
to find the bottommost visible line of the buffer.)
(The point-min
and point-max
functions give the min and max buffer positions, but those might be offscreen. I want to know the min and max on-screen buffer positions.)