mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 17:19:48 +01:00
open editors: focus active group even if it does not have an editor. Make sure list is not empty
fixes #56806
This commit is contained in:
@@ -389,7 +389,7 @@ export class OpenEditorsView extends ViewletPanel {
|
||||
}
|
||||
|
||||
private focusActiveEditor(): void {
|
||||
if (this.editorGroupService.activeGroup && this.editorGroupService.activeGroup.activeEditor /* could be empty */) {
|
||||
if (this.list.length && this.editorGroupService.activeGroup) {
|
||||
const index = this.getIndex(this.editorGroupService.activeGroup, this.editorGroupService.activeGroup.activeEditor);
|
||||
this.list.setFocus([index]);
|
||||
this.list.setSelection([index]);
|
||||
|
||||
Reference in New Issue
Block a user