File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
src/vs/workbench/contrib/customEditor/browser Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ import { EditorInput } from 'vs/workbench/common/editor/editorInput';
22
22
import { ICustomEditorModel , ICustomEditorService } from 'vs/workbench/contrib/customEditor/common/customEditor' ;
23
23
import { IOverlayWebview , IWebviewService } from 'vs/workbench/contrib/webview/browser/webview' ;
24
24
import { IWebviewWorkbenchService , LazilyResolvedWebviewEditorInput } from 'vs/workbench/contrib/webviewPanel/browser/webviewWorkbenchService' ;
25
- import { IFilesConfigurationService } from 'vs/workbench/services/filesConfiguration/common/filesConfigurationService' ;
25
+ import { AutoSaveMode , IFilesConfigurationService } from 'vs/workbench/services/filesConfiguration/common/filesConfigurationService' ;
26
26
import { IUntitledTextEditorService } from 'vs/workbench/services/untitled/common/untitledTextEditorService' ;
27
27
28
28
interface CustomEditorInputInitInfo {
@@ -302,6 +302,14 @@ export class CustomEditorInput extends LazilyResolvedWebviewEditorInput {
302
302
return ( await this . rename ( groupId , target ) ) ?. editor ;
303
303
}
304
304
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
+
305
313
public override async revert ( group : GroupIdentifier , options ?: IRevertOptions ) : Promise < void > {
306
314
if ( this . _modelRef ) {
307
315
return this . _modelRef . object . revert ( options ) ;
You can’t perform that action at this time.
0 commit comments