mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-11 10:38:31 -05:00
Merge from vscode 777931080477e28b7c27e8f7d4b0d69897945946 (#9220)
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { AbstractTextFileService } from 'vs/workbench/services/textfile/browser/textFileService';
|
||||
import { ITextFileService, IResourceEncodings, IResourceEncoding, ModelState } from 'vs/workbench/services/textfile/common/textfiles';
|
||||
import { ITextFileService, IResourceEncodings, IResourceEncoding, TextFileEditorModelState } from 'vs/workbench/services/textfile/common/textfiles';
|
||||
import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
|
||||
import { ShutdownReason } from 'vs/platform/lifecycle/common/lifecycle';
|
||||
|
||||
@@ -24,7 +24,7 @@ export class BrowserTextFileService extends AbstractTextFileService {
|
||||
}
|
||||
|
||||
protected onBeforeShutdown(reason: ShutdownReason): boolean {
|
||||
if (this.files.getAll().some(model => model.hasState(ModelState.PENDING_SAVE))) {
|
||||
if (this.files.models.some(model => model.hasState(TextFileEditorModelState.PENDING_SAVE))) {
|
||||
console.warn('Unload prevented: pending file saves');
|
||||
|
||||
return true; // files are pending to be saved: veto
|
||||
|
||||
Reference in New Issue
Block a user