Select the tab when moving the last tab to another window