Skip to content

Commit 71cc49b

Browse files
authored
💄
1 parent cb2ba4c commit 71cc49b

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/vs/workbench/browser/parts/editor/editorsObserver.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ export class EditorsObserver extends Disposable {
346346
if (this.editorGroupsService.partOptions.limit?.excludeDirty) {
347347
mostRecentEditorsCountingForLimit = mostRecentEditors.filter(({ editor }) => {
348348
if ((editor.isDirty() && !editor.isSaving()) || editor.hasCapability(EditorInputCapabilities.Scratchpad)) {
349-
return false;
349+
return false; // not dirty editors (unless in the process of saving) or scratchpads
350350
}
351351

352352
return true;
@@ -362,7 +362,7 @@ export class EditorsObserver extends Disposable {
362362
// Extract least recently used editors that can be closed
363363
const leastRecentlyClosableEditors = mostRecentEditorsCountingForLimit.reverse().filter(({ editor, groupId }) => {
364364
if ((editor.isDirty() && !editor.isSaving()) || editor.hasCapability(EditorInputCapabilities.Scratchpad)) {
365-
return false; // not dirty editors (unless in the process of saving)
365+
return false; // not dirty editors (unless in the process of saving) or scratchpads
366366
}
367367

368368
if (exclude && editor === exclude.editor && groupId === exclude.groupId) {

src/vs/workbench/services/workingCopy/common/workingCopy.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export const enum WorkingCopyCapabilities {
2828
* it is dirty and unsaved content will be
2929
* discarded without prompting if closed.
3030
*/
31-
Scratchpad = 1 << 2,
31+
Scratchpad = 1 << 2
3232
}
3333

3434
/**
@@ -172,7 +172,8 @@ export interface IWorkingCopy extends IWorkingCopyIdentifier {
172172
/**
173173
* Indicates that the file has unsaved changes.
174174
* Used for backup tracking and accounts for
175-
* working copies that are never dirty e.g. scratchpads
175+
* working copies that are never dirty e.g.
176+
* scratchpads.
176177
*/
177178
isModified(): boolean;
178179

0 commit comments

Comments
 (0)