mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-28 03:08:04 +01:00
Deleting folder containing dirty files closes dirty editors (fixes #8704)
This commit is contained in:
@@ -370,7 +370,7 @@ export class FileTracker implements IWorkbenchContribution {
|
||||
|
||||
private handleDelete(resource: URI): void {
|
||||
if (this.textFileService.isDirty(resource)) {
|
||||
return; // never dispose dirty resources
|
||||
return; // never dispose dirty resources from a delete
|
||||
}
|
||||
|
||||
// Add existing clients matching resource
|
||||
@@ -394,6 +394,9 @@ export class FileTracker implements IWorkbenchContribution {
|
||||
});
|
||||
|
||||
inputsContainingPath.forEach((input) => {
|
||||
if (input.isDirty()) {
|
||||
return; // never dispose dirty resources from a delete
|
||||
}
|
||||
|
||||
// Editor History
|
||||
this.historyService.remove(input);
|
||||
|
||||
Reference in New Issue
Block a user