mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
Merge pull request #188505 from microsoft/revert-187304-aamunger/dirtyCustomEditors
Revert "treat soon-to-be-autosaved as saving"
This commit is contained in:
commit
b358b35c2d
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue