Problem:
`get_scrolloffpad_value()` takes a window, but its else branch reads
`curwin->w_p_sop` instead of `wp->w_p_sop`.
Reachable from Vimscript, since `line('w0', winid)` runs
`update_topline()` on another window without making it current.
Solution:
Read the option from the window that was passed in.
AI-assisted