Selects index, moving it to the top of the tab history, or returns an already selected tab to its root.