The whole page gets refreshed when you run a command, so I’m not sure about retaining scroll state.
Maybe someone should write a JS interpreter :D