File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
services/workingCopy/common Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -346,7 +346,7 @@ export class EditorsObserver extends Disposable {
346
346
if ( this . editorGroupsService . partOptions . limit ?. excludeDirty ) {
347
347
mostRecentEditorsCountingForLimit = mostRecentEditors . filter ( ( { editor } ) => {
348
348
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
350
350
}
351
351
352
352
return true ;
@@ -362,7 +362,7 @@ export class EditorsObserver extends Disposable {
362
362
// Extract least recently used editors that can be closed
363
363
const leastRecentlyClosableEditors = mostRecentEditorsCountingForLimit . reverse ( ) . filter ( ( { editor, groupId } ) => {
364
364
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
366
366
}
367
367
368
368
if ( exclude && editor === exclude . editor && groupId === exclude . groupId ) {
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ export const enum WorkingCopyCapabilities {
28
28
* it is dirty and unsaved content will be
29
29
* discarded without prompting if closed.
30
30
*/
31
- Scratchpad = 1 << 2 ,
31
+ Scratchpad = 1 << 2
32
32
}
33
33
34
34
/**
@@ -172,7 +172,8 @@ export interface IWorkingCopy extends IWorkingCopyIdentifier {
172
172
/**
173
173
* Indicates that the file has unsaved changes.
174
174
* 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.
176
177
*/
177
178
isModified ( ) : boolean ;
178
179
You can’t perform that action at this time.
0 commit comments