mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 17:19:48 +01:00
Merge pull request #188505 from microsoft/revert-187304-aamunger/dirtyCustomEditors
Revert "treat soon-to-be-autosaved as saving"
This commit is contained in:
@@ -22,7 +22,7 @@ import { EditorInput } from 'vs/workbench/common/editor/editorInput';
|
||||
import { ICustomEditorModel, ICustomEditorService } from 'vs/workbench/contrib/customEditor/common/customEditor';
|
||||
import { IOverlayWebview, IWebviewService } from 'vs/workbench/contrib/webview/browser/webview';
|
||||
import { IWebviewWorkbenchService, LazilyResolvedWebviewEditorInput } from 'vs/workbench/contrib/webviewPanel/browser/webviewWorkbenchService';
|
||||
import { AutoSaveMode, IFilesConfigurationService } from 'vs/workbench/services/filesConfiguration/common/filesConfigurationService';
|
||||
import { IFilesConfigurationService } from 'vs/workbench/services/filesConfiguration/common/filesConfigurationService';
|
||||
import { IUntitledTextEditorService } from 'vs/workbench/services/untitled/common/untitledTextEditorService';
|
||||
|
||||
interface CustomEditorInputInitInfo {
|
||||
@@ -302,14 +302,6 @@ export class CustomEditorInput extends LazilyResolvedWebviewEditorInput {
|
||||
return (await this.rename(groupId, target))?.editor;
|
||||
}
|
||||
|
||||
override isSaving(): boolean {
|
||||
if (this.isDirty() && !this.hasCapability(EditorInputCapabilities.Untitled) && this.filesConfigurationService.getAutoSaveMode() === AutoSaveMode.AFTER_SHORT_DELAY) {
|
||||
return true; // will be saved soon
|
||||
}
|
||||
|
||||
return super.isSaving();
|
||||
}
|
||||
|
||||
public override async revert(group: GroupIdentifier, options?: IRevertOptions): Promise<void> {
|
||||
if (this._modelRef) {
|
||||
return this._modelRef.object.revert(options);
|
||||
|
||||
Reference in New Issue
Block a user