main: output selected object's links on the OSD

I should move those things outside the loop, probably.