Indeed. Looks like a hack to detect whether the window still shows the
same buffer. Anyway, window_end_pos and window_end_vpos are the more
promising candidates (if Eli agrees). Can you see whether the part
/* When splitting windows or for new windows, it happens that
redisplay is called with a nil window_end_vpos or one being
larger than the window. This should really be fixed in
window.c. I don't have this on my list, now, so we do
approximately the same as the old redisplay code. --gerd. */
&& INTEGERP (w->window_end_vpos)
in xdisp.c still makes sense? IIUC window_end_vpos is always an
integer.