Skip to content

Commit b358b35

Browse files
authored
Merge pull request microsoft#188505 from microsoft/revert-187304-aamunger/dirtyCustomEditors
Revert "treat soon-to-be-autosaved as saving"
2 parents ed1de9e + 21ae90f commit b358b35

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/vs/workbench/contrib/customEditor/browser/customEditorInput.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import { EditorInput } from 'vs/workbench/common/editor/editorInput';
2222
import { ICustomEditorModel, ICustomEditorService } from 'vs/workbench/contrib/customEditor/common/customEditor';
2323
import { IOverlayWebview, IWebviewService } from 'vs/workbench/contrib/webview/browser/webview';
2424
import { IWebviewWorkbenchService, LazilyResolvedWebviewEditorInput } from 'vs/workbench/contrib/webviewPanel/browser/webviewWorkbenchService';
25-
import { AutoSaveMode, IFilesConfigurationService } from 'vs/workbench/services/filesConfiguration/common/filesConfigurationService';
25+
import { IFilesConfigurationService } from 'vs/workbench/services/filesConfiguration/common/filesConfigurationService';
2626
import { IUntitledTextEditorService } from 'vs/workbench/services/untitled/common/untitledTextEditorService';
2727

2828
interface CustomEditorInputInitInfo {
@@ -302,14 +302,6 @@ export class CustomEditorInput extends LazilyResolvedWebviewEditorInput {
302302
return (await this.rename(groupId, target))?.editor;
303303
}
304304

305-
override isSaving(): boolean {
306-
if (this.isDirty() && !this.hasCapability(EditorInputCapabilities.Untitled) && this.filesConfigurationService.getAutoSaveMode() === AutoSaveMode.AFTER_SHORT_DELAY) {
307-
return true; // will be saved soon
308-
}
309-
310-
return super.isSaving();
311-
}
312-
313305
public override async revert(group: GroupIdentifier, options?: IRevertOptions): Promise<void> {
314306
if (this._modelRef) {
315307
return this._modelRef.object.revert(options);

0 commit comments

Comments
 (0)