Fixed editors.component close-tab when 1 file remains

This commit is contained in:
itdominator 2025-07-16 23:39:00 -05:00
parent a0914e8096
commit 79adb86d25

View File

@ -274,7 +274,7 @@ export class EditorsComponent {
if (editorComponent.editor.session !== file.session) continue; if (editorComponent.editor.session !== file.session) continue;
let targetFile = this.filesService.getPreviousFile(file.path) let targetFile = this.filesService.getPreviousFile(file.path)
if (targetFile) { if (targetFile && (targetFile.path !== message.filePath)) {
editorComponent.assignSession(targetFile); editorComponent.assignSession(targetFile);
if (activeComponent == editorComponent) { if (activeComponent == editorComponent) {
this.editorsService.miniMapView.cloneSession(targetFile); this.editorsService.miniMapView.cloneSession(targetFile);