winsaveview() returns multiple details about the window including the leftcol which is the amount of horizontal scroll. However you need to switch to the window to get that. getwininfo() returns almost all information, for instance topline to determine the vertical scroll except the horizontal scroll. I'm just wondering if there is a way to horizontal scroll without window switching.
wincolattribute ongetwininfo()?win_screenpos(). The two clauses there seem contradictory :(