aboutsummaryrefslogtreecommitdiff
path: root/editors/code
diff options
context:
space:
mode:
Diffstat (limited to 'editors/code')
-rw-r--r--editors/code/src/commands.ts12
1 files changed, 9 insertions, 3 deletions
diff --git a/editors/code/src/commands.ts b/editors/code/src/commands.ts
index 8c9d7802f..0e78f5101 100644
--- a/editors/code/src/commands.ts
+++ b/editors/code/src/commands.ts
@@ -158,7 +158,7 @@ export function ssr(ctx: Ctx): Cmd {
158 158
159 const options: vscode.InputBoxOptions = { 159 const options: vscode.InputBoxOptions = {
160 value: "() ==>> ()", 160 value: "() ==>> ()",
161 prompt: "Enter request, for example 'Foo($a:expr) ==> Foo::new($a)' ", 161 prompt: "Enter request, for example 'Foo($a) ==> Foo::new($a)' ",
162 validateInput: async (x: string) => { 162 validateInput: async (x: string) => {
163 try { 163 try {
164 await client.sendRequest(ra.ssr, { query: x, parseOnly: true }); 164 await client.sendRequest(ra.ssr, { query: x, parseOnly: true });
@@ -171,9 +171,15 @@ export function ssr(ctx: Ctx): Cmd {
171 const request = await vscode.window.showInputBox(options); 171 const request = await vscode.window.showInputBox(options);
172 if (!request) return; 172 if (!request) return;
173 173
174 const edit = await client.sendRequest(ra.ssr, { query: request, parseOnly: false }); 174 vscode.window.withProgress({
175 location: vscode.ProgressLocation.Notification,
176 title: "Structured search replace in progress...",
177 cancellable: false,
178 }, async (_progress, _token) => {
179 const edit = await client.sendRequest(ra.ssr, { query: request, parseOnly: false });
175 180
176 await vscode.workspace.applyEdit(client.protocol2CodeConverter.asWorkspaceEdit(edit)); 181 await vscode.workspace.applyEdit(client.protocol2CodeConverter.asWorkspaceEdit(edit));
182 });
177 }; 183 };
178} 184}
179 185