window-next-sibling

window-next-sibling is a built-in function in `C source code'.

(window-next-sibling &optional WINDOW)

Return the next sibling window of window WINDOW.
WINDOW must be a valid window and defaults to the selected one.
Return nil if WINDOW has no next sibling.