aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/commands.ts
diff options
context:
space:
mode:
authorDavid Lattimore <[email protected]>2020-06-29 10:17:35 +0100
committerDavid Lattimore <[email protected]>2020-06-29 10:17:35 +0100
commit43b7d505dad2b6c4a8fd3b6ebb97c287ce06ce56 (patch)
tree99bc1e62ee93535eda3665edec8ac9dd05c1eec3 /editors/code/src/commands.ts
parentca31b1d63ae91a69f1ce9c0b075403834ba19f38 (diff)
Show notification while SSR is in progress
Ideally we would (a) show progress and (b) allow cancellation, but at least now there's some indication to the user that something is happening.
Diffstat (limited to 'editors/code/src/commands.ts')
-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..5606b6e9e 100644
--- a/editors/code/src/commands.ts
+++ b/editors/code/src/commands.ts
@@ -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 175 location: vscode.ProgressLocation.Notification,
176 await vscode.workspace.applyEdit(client.protocol2CodeConverter.asWorkspaceEdit(edit)); 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 });
180
181 await vscode.workspace.applyEdit(client.protocol2CodeConverter.asWorkspaceEdit(edit));
182 });
177 }; 183 };
178} 184}
179 185