window-prev-sibling

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

(window-prev-sibling &optional WINDOW)

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