We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6a56ed8 + d9854fd commit 018cd22Copy full SHA for 018cd22
src/commands/studio.ts
@@ -42,7 +42,15 @@ function doMenuAction(uri: vscode.Uri, menuType: string): Promise<any> {
42
.then(action => {
43
if (action) {
44
const query = "select * from %Atelier_v1_Utils.Extension_UserAction(?, ?, ?, ?)";
45
- const parameters = ["0", action.id, name, ""];
+ let selectedText = "";
46
+ const editor = vscode.window.activeTextEditor;
47
+ if (!editor) {
48
+ selectedText = ""
49
+ }
50
+ const selection = editor.selection;
51
+ selectedText = editor.document.getText(selection);
52
+
53
+ const parameters = ["0", action.id, name, selectedText];
54
return vscode.window.withProgress(
55
{
56
cancellable: false,
0 commit comments