File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed
packages/core/src/stepFunctions/workflowStudio Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -147,16 +147,18 @@ export class WorkflowStudioEditor {
147147
148148 // The text document acts as our model, thus we send and event to the webview on file save to trigger update
149149 contextObject . disposables . push (
150- vscode . workspace . onDidSaveTextDocument ( async ( ) => {
151- await telemetry . stepfunctions_saveFile . run ( async ( span ) => {
152- span . record ( {
153- id : contextObject . fileId ,
154- saveType : 'MANUAL_SAVE' ,
155- source : 'VSCODE' ,
156- isInvalidJson : isInvalidJsonFile ( contextObject . textDocument ) ,
150+ vscode . workspace . onDidSaveTextDocument ( async ( savedDocument ) => {
151+ if ( savedDocument . uri . toString ( ) === this . documentUri . toString ( ) ) {
152+ await telemetry . stepfunctions_saveFile . run ( async ( span ) => {
153+ span . record ( {
154+ id : contextObject . fileId ,
155+ saveType : 'MANUAL_SAVE' ,
156+ source : 'VSCODE' ,
157+ isInvalidJson : isInvalidJsonFile ( contextObject . textDocument ) ,
158+ } )
159+ await broadcastFileChange ( contextObject , 'MANUAL_SAVE' )
157160 } )
158- await broadcastFileChange ( contextObject , 'MANUAL_SAVE' )
159- } )
161+ }
160162 } )
161163 )
162164
You can’t perform that action at this time.
0 commit comments