Skip to content

Commit dd113da

Browse files
authored
fix(stepFunctions): add correct keybinding clause for aws.previewStateMachine #2652
1 parent 5dbf5e6 commit dd113da

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2828,7 +2828,7 @@
28282828
"command": "aws.previewStateMachine",
28292829
"key": "ctrl+shift+v",
28302830
"mac": "cmd+shift+v",
2831-
"when": "editorTextFocus && (editorLangId == asl || editorLangId == asl-yaml)"
2831+
"when": "editorTextFocus && editorLangId == asl || editorTextFocus && editorLangId == asl-yaml"
28322832
}
28332833
],
28342834
"grammars": [

src/awsexplorer/localExplorer.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,8 @@ export function createLocalExplorerView(): vscode.TreeView<TreeNode> {
5252
}
5353
})
5454

55+
// Legacy CDK behavior. Mostly useful for C9 as they do not have inline buttons.
56+
view.onDidChangeVisibility(({ visible }) => visible && cdkNode.refresh())
57+
5558
return view
5659
}

src/stepFunctions/activation.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ async function registerStepFunctionCommands(
5252
*/
5353
vscode.commands.registerCommand('aws.previewStateMachine', async (arg?: vscode.TextEditor | vscode.Uri) => {
5454
try {
55+
arg ??= vscode.window.activeTextEditor
5556
const input = arg instanceof vscode.Uri ? arg : arg?.document
5657

5758
if (!input) {

src/stepFunctions/commands/visualizeStateMachine/aslVisualizationCDKManager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export class AslVisualizationCDKManager extends AbstractAslVisualizationManager<
3636
try {
3737
await this.cache.updateCache(globalStorage)
3838

39-
const textDocument = await vscode.workspace.openTextDocument(templateUri)
39+
const textDocument = await vscode.workspace.openTextDocument(templateUri.with({ fragment: '' }))
4040
const newVisualization = new AslVisualizationCDK(textDocument, templateUri.fsPath, resourceName)
4141
this.handleNewVisualization(this.getKey(uri), newVisualization)
4242

0 commit comments

Comments
 (0)