When closing editors or view in Theia, the last focused tab is selected in the bar.
When there is no 'previous' widget found, the selected tab is the next tab to the right, except when the widget is the last one.
In this case, the first widget is selected, rather than the one to the left of the closed tab.
When closing editors or view in Theia, the last focused tab is selected in the bar. When there is no 'previous' widget found, the selected tab is the next tab to the right, except when the widget is the last one. In this case, the first widget is selected, rather than the one to the left of the closed tab.
Example:
https://github.com/eclipse-theia/theia/assets/3964263/122d8c58-ff53-493c-8f69-0f1d59785310