Track window-local jumps more reliably

Use window-local varibales instead of manually maintaining a
multi-dimensional array with tabs and window numbers.