mostly working version

Doesn't currently go to the correct place in the list for the current
window or the last window though.